mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 07:51:41 +08:00
update
This commit is contained in:
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"18K\", \"totalSubmission\": \"57.5K\", \"totalAcceptedRaw\": 18037, \"totalSubmissionRaw\": 57512, \"acRate\": \"31.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"18.1K\", \"totalSubmission\": \"57.6K\", \"totalAcceptedRaw\": 18071, \"totalSubmissionRaw\": 57567, \"acRate\": \"31.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