Skip to content

Commit 07b3fb1

Browse files
committedMay 27, 2021
docs: update documentation for lcof problem: No.46
1 parent 18b5e58 commit 07b3fb1

File tree

1 file changed

+3
-1
lines changed
  • lcof/面试题46. 把数字翻译成字符串

1 file changed

+3
-1
lines changed
 

‎lcof/面试题46. 把数字翻译成字符串/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ var translateNum = function (num) {
9090

9191
### **C++**
9292

93-
注释的代码是一维 dp ,因为 `dp[i]` 只依赖 `dp[i - 1]``dp[i - 2]` ,所以可以进一步压缩空间。
93+
动态规划解法,定义 `dp[i]` 表示前 `i` 个数字有多少种不同的翻译方法。
94+
95+
注释部分是常规的一维 dp ,因为 `dp[i]` 只依赖 `dp[i - 1]``dp[i - 2]` ,所以可以进一步压缩空间。
9496

9597
```cpp
9698
class Solution {

0 commit comments

Comments
 (0)
Please sign in to comment.