mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 00:11:41 +08:00
update
This commit is contained in:
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"7.4K\", \"totalSubmission\": \"21K\", \"totalAcceptedRaw\": 7442, \"totalSubmissionRaw\": 21013, \"acRate\": \"35.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"7.4K\", \"totalSubmission\": \"21K\", \"totalAcceptedRaw\": 7443, \"totalSubmissionRaw\": 21014, \"acRate\": \"35.4%\"}",
|
||||
"hints": [
|
||||
"Sort the array nums and create another array cnt of size nums[i].",
|
||||
"Use backtracking to generate all the beautiful subsets. If cnt[nums[i] - k] is positive, then it is impossible to add nums[i] in the subset, and we just move to the next index. Otherwise, it is also possible to add nums[i] in the subset, in this case, increase cnt[nums[i]], and move to the next index.",
|
||||
|
Reference in New Issue
Block a user