mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-23 08:47:12 +00:00
Fix a definition.
This commit is contained in:
@@ -20,7 +20,7 @@ fn climbing_stairs_dp(n: usize) -> i32 {
|
||||
dp[n]
|
||||
}
|
||||
|
||||
/* 爬楼梯:状态压缩后的动态规划 */
|
||||
/* 爬楼梯:空间优化后的动态规划 */
|
||||
fn climbing_stairs_dp_comp(n: usize) -> i32 {
|
||||
if n == 1 || n == 2 { return n as i32; }
|
||||
let (mut a, mut b) = (1, 2);
|
||||
|
||||
Reference in New Issue
Block a user