【leetcode】Climbing Stairs
来源:互联网 发布:古装电影推荐 知乎 编辑:程序博客网 时间:2024/06/06 19:40
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
Accept: 1ms
int dp[10000] = {0, 1, 2};int climbStairs(int n) { if (dp[n] == 0) { dp[n] = climbStairs(n - 1) + climbStairs(n - 2); } return dp[n];}
0 0
- LeetCode: Climbing Stairs
- LeetCode: Climbing Stairs
- [LeetCode]Climbing Stairs
- LeetCode Climbing Stairs
- [Leetcode] Climbing Stairs
- Leetcode: Climbing stairs
- LeetCode Climbing Stairs
- [LeetCode] Climbing Stairs
- leetcode 107: Climbing Stairs
- [LeetCode] Climbing Stairs
- [LeetCode]Climbing Stairs
- [leetcode]Climbing Stairs
- LeetCode-Climbing Stairs
- [leetcode] Climbing Stairs
- LeetCode - Climbing Stairs
- LeetCode:Climbing Stairs
- Leetcode Climbing Stairs
- LeetCode | Climbing Stairs
- bash variables prefix with $
- 小马哥-----关于线刷固件刷机出现4032的另类解决方法浅析
- jquery的学习
- S5PV210内存地址空间
- Java 自定义回调函数(编写属于自己的SDK)
- 【leetcode】Climbing Stairs
- UVA - 201 Squares(水)
- H264 的视频编码层的错误恢复
- VIM使用技巧
- 记初次参加ACM校赛
- SLIC算法 超像素 superpixel
- 写歌第十四首《三月木棉花》
- shell中生成指定长度的字符串和随机数
- 春季三月-学习生活感悟