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,7 +11,7 @@
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 934,
"likes": 945,
"dislikes": 95,
"isLiked": null,
"similarQuestions": "[]",
@@ -161,7 +161,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"21.3K\", \"totalSubmission\": \"62.2K\", \"totalAcceptedRaw\": 21277, \"totalSubmissionRaw\": 62233, \"acRate\": \"34.2%\"}",
"stats": "{\"totalAccepted\": \"21.6K\", \"totalSubmission\": \"63.1K\", \"totalAcceptedRaw\": 21616, \"totalSubmissionRaw\": 63150, \"acRate\": \"34.2%\"}",
"hints": [
"Make a new array A of +1/-1s corresponding to if hours[i] is > 8 or not. The goal is to find the longest subarray with positive sum.",
"Using prefix sums (PrefixSum[i+1] = A[0] + A[1] + ... + A[i]), you need to find for each j, the smallest i < j with PrefixSum[i] + 1 == PrefixSum[j]."