1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-04 15:01:40 +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,8 +11,8 @@
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 8645,
"dislikes": 233,
"likes": 8659,
"dislikes": 234,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Remove Element\", \"titleSlug\": \"remove-element\", \"difficulty\": \"Easy\", \"translatedTitle\": null}]",
"exampleTestcases": "[0,1,0,3,12]\n[0]",
@@ -131,7 +131,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"1.6M\", \"totalSubmission\": \"2.6M\", \"totalAcceptedRaw\": 1586173, \"totalSubmissionRaw\": 2623685, \"acRate\": \"60.5%\"}",
"stats": "{\"totalAccepted\": \"1.6M\", \"totalSubmission\": \"2.6M\", \"totalAcceptedRaw\": 1589406, \"totalSubmissionRaw\": 2628528, \"acRate\": \"60.5%\"}",
"hints": [
"<b>In-place</b> means we should not be allocating any space for extra array. But we are allowed to modify the existing array. However, as a first step, try coming up with a solution that makes use of additional space. For this problem as well, first apply the idea discussed using an additional array and the in-place solution will pop up eventually.",
"A <b>two-pointer</b> approach could be helpful here. The idea would be to have one pointer for iterating the array and another pointer that just works on the non-zero elements of the array."