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": 2041,
"dislikes": 70,
"likes": 2089,
"dislikes": 74,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Partition Array Into Two Arrays to Minimize Sum Difference\", \"titleSlug\": \"partition-array-into-two-arrays-to-minimize-sum-difference\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]",
"exampleTestcases": "[2,7,4,1,8,1]\n[31,26,33,21,40]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"51.3K\", \"totalSubmission\": \"100.9K\", \"totalAcceptedRaw\": 51285, \"totalSubmissionRaw\": 100916, \"acRate\": \"50.8%\"}",
"stats": "{\"totalAccepted\": \"52.8K\", \"totalSubmission\": \"103.5K\", \"totalAcceptedRaw\": 52805, \"totalSubmissionRaw\": 103512, \"acRate\": \"51.0%\"}",
"hints": [
"Think of the final answer as a sum of weights with + or - sign symbols infront of each weight. Actually, all sums with 1 of each sign symbol are possible.",
"Use dynamic programming: for every possible sum with N stones, those sums +x or -x is possible with N+1 stones, where x is the value of the newest stone. (This overcounts sums that are all positive or all negative, but those don't matter.)"