Skip to content

Commit 8153319

Browse files
author
lucifer
committed
feat: 数位 dp
1 parent b392820 commit 8153319

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

‎src/roadmap/roadmap.jsx

+11-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Solution:
3232
for j in range(i + 1, n):
3333
# do something
3434
return dp[0][m-1] # 一般都是使用这个��间作为答案
35-
`
35+
`;
3636
const dpRangeCodeRecur = `
3737
class Solution:
3838
def solve(self, s):
@@ -44,7 +44,7 @@ class Solution:
4444
return helper(l + 1, r - 1)
4545
return 1 + min(helper(l + 1, r), helper(l, r - 1))
4646
return helper(0, len(s) - 1)
47-
`
47+
`;
4848

4949
const roadmaps = {
5050
"binary-search": {
@@ -418,9 +418,15 @@ def count_bs(nums, k):
418418
link:
419419
"https://github.com/azl397985856/leetcode/blob/master/problems/1015.smallest-integer-divisible-by-k.md",
420420
},
421+
{
422+
text: "递增的数位",
423+
link: "https://binarysearch.com/problems/Increasing-Digits",
424+
},
421425
],
422426
code: void 0,
423-
keys: [],
427+
keys: [
428+
"常见的 dp 定义为 dp[i][j] 其中 i 为数字的长度, j 为最后一位的数。比如 dp[3][2] 表示这个数一共三位,最后一位是 2 的情况",
429+
],
424430
},
425431
{
426432
title: "概率型(仅列举题目)",
@@ -486,7 +492,8 @@ def count_bs(nums, k):
486492
// "https://tva1.sinaimg.cn/large/0081Kckwly1glpjptuor0j31n00u0q8y.jpg",
487493
problems: [
488494
{
489-
link: "https://binarysearch.com/problems/Make-a-Palindrome-by-Inserting-Characters",
495+
link:
496+
"https://binarysearch.com/problems/Make-a-Palindrome-by-Inserting-Characters",
490497
text: "回文插入",
491498
desc:
492499
"区间 dp 需要从序列两头同时进行,而不是从序列的某一端到另一端",

0 commit comments

Comments
 (0)