mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 23:41:41 +08:00
update
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 439,
|
||||
"likes": 440,
|
||||
"dislikes": 59,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Range Sum Query 2D - Mutable\", \"titleSlug\": \"range-sum-query-2d-mutable\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Count Positions on Street With Required Brightness\", \"titleSlug\": \"count-positions-on-street-with-required-brightness\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"19.2K\", \"totalSubmission\": \"39.7K\", \"totalAcceptedRaw\": 19186, \"totalSubmissionRaw\": 39701, \"acRate\": \"48.3%\"}",
|
||||
"stats": "{\"totalAccepted\": \"19.2K\", \"totalSubmission\": \"39.7K\", \"totalAcceptedRaw\": 19204, \"totalSubmissionRaw\": 39722, \"acRate\": \"48.3%\"}",
|
||||
"hints": [
|
||||
"Imagine each row as a separate array. Instead of updating the whole submatrix together, we can use prefix sum to update each row separately.",
|
||||
"For each query, iterate over the rows i in the range [row1, row2] and add 1 to prefix sum S[i][col1], and subtract 1 from S[i][col2 + 1].",
|
||||
|
Reference in New Issue
Block a user