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-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -11,8 +11,8 @@
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 8659,
"dislikes": 234,
"likes": 8915,
"dislikes": 240,
"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\": 1589406, \"totalSubmissionRaw\": 2628528, \"acRate\": \"60.5%\"}",
"stats": "{\"totalAccepted\": \"1.6M\", \"totalSubmission\": \"2.7M\", \"totalAcceptedRaw\": 1631160, \"totalSubmissionRaw\": 2691718, \"acRate\": \"60.6%\"}",
"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."