mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 23:11:41 +08:00
update
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 520,
|
||||
"likes": 551,
|
||||
"dislikes": 6,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Minimum Swaps to Group All 1's Together\", \"titleSlug\": \"minimum-swaps-to-group-all-1s-together\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"12.6K\", \"totalSubmission\": \"26.7K\", \"totalAcceptedRaw\": 12617, \"totalSubmissionRaw\": 26739, \"acRate\": \"47.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"13.3K\", \"totalSubmission\": \"27.9K\", \"totalAcceptedRaw\": 13338, \"totalSubmissionRaw\": 27916, \"acRate\": \"47.8%\"}",
|
||||
"hints": [
|
||||
"Notice that the number of 1’s to be grouped together is fixed. It is the number of 1's the whole array has.",
|
||||
"Call this number total. We should then check for every subarray of size total (possibly wrapped around), how many swaps are required to have the subarray be all 1’s.",
|
||||
|
Reference in New Issue
Block a user