mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 23:11:41 +08:00
update
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 740,
|
||||
"dislikes": 34,
|
||||
"likes": 750,
|
||||
"dislikes": 36,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Painting a Grid With Three Different Colors\", \"titleSlug\": \"painting-a-grid-with-three-different-colors\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]",
|
||||
"exampleTestcases": "1\n5000",
|
||||
@@ -137,7 +137,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"24.1K\", \"totalSubmission\": \"38.9K\", \"totalAcceptedRaw\": 24066, \"totalSubmissionRaw\": 38925, \"acRate\": \"61.8%\"}",
|
||||
"stats": "{\"totalAccepted\": \"24.5K\", \"totalSubmission\": \"39.6K\", \"totalAcceptedRaw\": 24487, \"totalSubmissionRaw\": 39626, \"acRate\": \"61.8%\"}",
|
||||
"hints": [
|
||||
"We will use Dynamic programming approach. we will try all possible configuration.",
|
||||
"Let dp[idx][prev1col][prev2col][prev3col] be the number of ways to color the rows of the grid from idx to n-1 keeping in mind that the previous row (idx - 1) has colors prev1col, prev2col and prev3col. Build the dp array to get the answer."
|
||||
|
Reference in New Issue
Block a user