mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 16:01:41 +08:00
update
This commit is contained in:
@@ -161,7 +161,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"10.5K\", \"totalSubmission\": \"26.8K\", \"totalAcceptedRaw\": 10466, \"totalSubmissionRaw\": 26784, \"acRate\": \"39.1%\"}",
|
||||
"stats": "{\"totalAccepted\": \"10.5K\", \"totalSubmission\": \"26.8K\", \"totalAcceptedRaw\": 10473, \"totalSubmissionRaw\": 26793, \"acRate\": \"39.1%\"}",
|
||||
"hints": [
|
||||
"Let's denote dp[r] = minimum cost to partition the first r elements of nums. What would be the transitions of such dynamic programming?",
|
||||
"dp[r] = min(dp[l] + importance(nums[l..r])) over all 0 <= l < r. This already gives us an O(n^3) approach, as importance can be calculated in linear time, and there are a total of O(n^2) transitions.",
|
||||
|
Reference in New Issue
Block a user