Skip to content

Commit f9d6097

Browse files
committed
explain
1 parent 70ca5a1 commit f9d6097

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/n0174_dungeon_game.rs

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ pub struct Solution {}
6868
6969
倒推到 hp[0][0] 即可
7070
71+
这里倒推很重要, 因为正推很难 dp(有后效性)
72+
7173
其实可以优化成 O(M+N) 空间复杂度, 从斜对角线往后推就只需要保存一个小数组, 但是下面这样更简明
7274
*/
7375
impl Solution {

0 commit comments

Comments
 (0)