1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-07 08:21:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 16:56:27 +08:00
parent e730aa6794
commit ad15da05aa
2517 changed files with 7358 additions and 7332 deletions

View File

@@ -137,7 +137,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"8.5K\", \"totalSubmission\": \"15.3K\", \"totalAcceptedRaw\": 8515, \"totalSubmissionRaw\": 15308, \"acRate\": \"55.6%\"}",
"stats": "{\"totalAccepted\": \"8.5K\", \"totalSubmission\": \"15.3K\", \"totalAcceptedRaw\": 8528, \"totalSubmissionRaw\": 15325, \"acRate\": \"55.6%\"}",
"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."