1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-04 23:11:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 15:21:05 +08:00
parent b84ae535b7
commit e730aa6794
2244 changed files with 8703 additions and 59499 deletions

View File

@@ -11,7 +11,7 @@
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 519,
"likes": 520,
"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\": 12592, \"totalSubmissionRaw\": 26694, \"acRate\": \"47.2%\"}",
"stats": "{\"totalAccepted\": \"12.6K\", \"totalSubmission\": \"26.7K\", \"totalAcceptedRaw\": 12617, \"totalSubmissionRaw\": 26739, \"acRate\": \"47.2%\"}",
"hints": [
"Notice that the number of 1s 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 1s.",