70. 爬楼梯 - 简单

70. 爬楼梯
动态规划
- 时间复杂度
O(n) n 是输入的,循环执行 n 次 - 空间复杂度
O(1) 只用了常数个变量作为辅助空间,故渐进空间复杂度为 O(1)。
1 | // n ans |
- Post title:70. 爬楼梯 - 简单
- Post author:xxxixxxx
- Create time:2021-02-24 15:09:00
- Post link:https://xxxixxx.github.io/2021/02/24/2000-016-70. 爬楼梯/
- Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
Comments