1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-06 16:01:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2023-12-09 19:57:46 +08:00
parent 9bc4722a45
commit 3770b44d1e
4792 changed files with 10889 additions and 10886 deletions

View File

@@ -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.",