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-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": "Medium",
"likes": 16830,
"dislikes": 1620,
"likes": 17522,
"dislikes": 1679,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Two Sum\", \"titleSlug\": \"two-sum\", \"difficulty\": \"Easy\", \"translatedTitle\": null}, {\"title\": \"3Sum Closest\", \"titleSlug\": \"3sum-closest\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"4Sum\", \"titleSlug\": \"4sum\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"3Sum Smaller\", \"titleSlug\": \"3sum-smaller\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "[-1,0,1,2,-1,-4]\n[]\n[0]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"1.8M\", \"totalSubmission\": \"6M\", \"totalAcceptedRaw\": 1849340, \"totalSubmissionRaw\": 5992787, \"acRate\": \"30.9%\"}",
"stats": "{\"totalAccepted\": \"1.9M\", \"totalSubmission\": \"6.2M\", \"totalAcceptedRaw\": 1917868, \"totalSubmissionRaw\": 6171190, \"acRate\": \"31.1%\"}",
"hints": [
"So, we essentially need to find three numbers x, y, and z such that they add up to the given value. If we fix one of the numbers say x, we are left with the two-sum problem at hand!",
"For the two-sum problem, if we fix one of the numbers, say <pre>x</pre>, we have to scan the entire array to find the next number<pre>y</pre> which is <pre>value - x</pre> where value is the input parameter. Can we change our array somehow so that this search becomes faster?",