mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 23:41:41 +08:00
update
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 15731,
|
||||
"likes": 15733,
|
||||
"dislikes": 404,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Remove Element\", \"titleSlug\": \"remove-element\", \"difficulty\": \"Easy\", \"translatedTitle\": null}, {\"title\": \"Apply Operations to an Array\", \"titleSlug\": \"apply-operations-to-an-array\", \"difficulty\": \"Easy\", \"translatedTitle\": null}]",
|
||||
@@ -131,7 +131,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"2.6M\", \"totalSubmission\": \"4.3M\", \"totalAcceptedRaw\": 2617714, \"totalSubmissionRaw\": 4258768, \"acRate\": \"61.5%\"}",
|
||||
"stats": "{\"totalAccepted\": \"2.6M\", \"totalSubmission\": \"4.3M\", \"totalAcceptedRaw\": 2617968, \"totalSubmissionRaw\": 4259149, \"acRate\": \"61.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."
|
||||
|
Reference in New Issue
Block a user