1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 07:21: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": 3355,
"dislikes": 5040,
"likes": 3365,
"dislikes": 5042,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Remove Duplicates from Sorted Array\", \"titleSlug\": \"remove-duplicates-from-sorted-array\", \"difficulty\": \"Easy\", \"translatedTitle\": null}, {\"title\": \"Remove Linked List Elements\", \"titleSlug\": \"remove-linked-list-elements\", \"difficulty\": \"Easy\", \"translatedTitle\": null}, {\"title\": \"Move Zeroes\", \"titleSlug\": \"move-zeroes\", \"difficulty\": \"Easy\", \"translatedTitle\": null}]",
"exampleTestcases": "[3,2,2,3]\n3\n[0,1,2,2,3,0,4,2]\n2",
@@ -131,7 +131,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"1.2M\", \"totalSubmission\": \"2.4M\", \"totalAcceptedRaw\": 1214923, \"totalSubmissionRaw\": 2379388, \"acRate\": \"51.1%\"}",
"stats": "{\"totalAccepted\": \"1.2M\", \"totalSubmission\": \"2.4M\", \"totalAcceptedRaw\": 1217409, \"totalSubmissionRaw\": 2383730, \"acRate\": \"51.1%\"}",
"hints": [
"The problem statement clearly asks us to modify the array in-place and it also says that the element beyond the new length of the array can be anything. Given an element, we need to remove all the occurrences of it from the array. We don't technically need to <b>remove</b> that element per-say, right?",
"We can move all the occurrences of this element to the end of the array. Use two pointers!\r\n<br><img src=\"https://assets.leetcode.com/uploads/2019/10/20/hint_remove_element.png\" width=\"500\"/>",