mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-08 05:26:07 +00:00
Fix a definition.
This commit is contained in:
@@ -186,7 +186,7 @@ $$
|
||||
=== "<15>"
|
||||

|
||||
|
||||
### 状态压缩
|
||||
### 空间优化
|
||||
|
||||
由于 $dp[i,j]$ 是由上方 $dp[i-1, j]$ 、左方 $dp[i, j-1]$ 、左上方状态 $dp[i-1, j-1]$ 转移而来,而正序遍历会丢失左上方 $dp[i-1, j-1]$ ,倒序遍历无法提前构建 $dp[i, j-1]$ ,因此两种遍历顺序都不可取。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user