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": "Medium",
"likes": 148,
"dislikes": 142,
"likes": 150,
"dislikes": 145,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "[1,-1,1]\n3\n-4\n[1,-10,9,1]\n100\n0",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"13.9K\", \"totalSubmission\": \"33.5K\", \"totalAcceptedRaw\": 13907, \"totalSubmissionRaw\": 33494, \"acRate\": \"41.5%\"}",
"stats": "{\"totalAccepted\": \"14.2K\", \"totalSubmission\": \"34.1K\", \"totalAcceptedRaw\": 14178, \"totalSubmissionRaw\": 34086, \"acRate\": \"41.6%\"}",
"hints": [
"Try thinking about the problem as if the array is empty. Then you only need to form goal using elements whose absolute value is <= limit.",
"You can greedily set all of the elements except one to limit or -limit, so the number of elements you need is ceil(abs(goal)/ limit).",