70. Climbing Stairs
2016-03-14 13:06
363 查看
class Solution { public: int climbStairs(int n) { int *d=new int [n+1]; d[1]=1; d[2]=2; for(int i=3;i<=n;i++) { d[i]=d[i-1]+d[i-2]; } int num=d ; delete[] d; return num; } };
相关文章推荐
- Leetcode 11. Container With Most Water
- Kafka High Availability
- 苹果Macbook Air怎么安装Win7系统图解教程(图)
- 我的思考,我的科技漫谈——人工智能
- 11 Container With Most Water
- Exception in thread "main" org.hibernate.HibernateException: save is not valid without active transaction
- pku3317 Stake Your Claim 极大极小搜索+状压+AB剪枝
- 图灵机器人——人工智能聊天服务
- AI设计的若干规则阐述
- Available Memory Is Low
- wait()函数,waitpid()函数
- Unix Study之--AIX6.1 Install hacmp6.1
- Unix Study之--AIX6.1 Install hacmp6.1
- Genymotion 提示 failed to import ova file
- 11. Container With Most Water
- 谈谈人工智能、围棋与数学
- Tomcat启动过程(三):从SocketProcessor到Container
- 揭秘AlphaGo背后团队:人工智能的下一个目标是什么?
- 跳槽季,TurboMail邮件系统支招防员工邮件泄密
- sublime text 3配置 rails tmTheme