1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 15:31:43 +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

@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"31.8K\", \"totalSubmission\": \"50.2K\", \"totalAcceptedRaw\": 31802, \"totalSubmissionRaw\": 50205, \"acRate\": \"63.3%\"}",
"stats": "{\"totalAccepted\": \"31.8K\", \"totalSubmission\": \"50.2K\", \"totalAcceptedRaw\": 31804, \"totalSubmissionRaw\": 50207, \"acRate\": \"63.3%\"}",
"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."