mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 07:51:41 +08:00
update
This commit is contained in:
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"7.4K\", \"totalSubmission\": \"12.1K\", \"totalAcceptedRaw\": 7408, \"totalSubmissionRaw\": 12102, \"acRate\": \"61.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"7.4K\", \"totalSubmission\": \"12.1K\", \"totalAcceptedRaw\": 7412, \"totalSubmissionRaw\": 12106, \"acRate\": \"61.2%\"}",
|
||||
"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