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,7 +11,7 @@
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 1599,
"likes": 1601,
"dislikes": 47,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Minimum Size Subarray Sum\", \"titleSlug\": \"minimum-size-subarray-sum\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Range Sum Query - Immutable\", \"titleSlug\": \"range-sum-query-immutable\", \"difficulty\": \"Easy\", \"translatedTitle\": null}, {\"title\": \"Contiguous Array\", \"titleSlug\": \"contiguous-array\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Subarray Product Less Than K\", \"titleSlug\": \"subarray-product-less-than-k\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
@@ -34,7 +34,7 @@
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"151.3K\", \"totalSubmission\": \"308.6K\", \"totalAcceptedRaw\": 151298, \"totalSubmissionRaw\": 308566, \"acRate\": \"49.0%\"}",
"stats": "{\"totalAccepted\": \"151.5K\", \"totalSubmission\": \"308.9K\", \"totalAcceptedRaw\": 151474, \"totalSubmissionRaw\": 308906, \"acRate\": \"49.0%\"}",
"hints": [
"Compute the prefix sum array where psum[i] is the sum of all the elements from <i>0</i> to <i>i</i>.",
"At each index <i>i</i>, the sum of the prefix is psum[i], so we are searching for the index x where psum[x] = psum[i] - k.\r\nThe subarray [x + 1, i] will be of sum k.",