许愿_offer++
许愿_offer++
题解
跳台阶
全部文章
题解
归档
标签
去牛客网
登录
/
注册
跳台阶
1107 浏览
0 回复
2019-07-31
许愿_offer++
+关注
跳台阶
http://www.nowcoder.com/practice/8c82a5b80378478f9484d87d1c5f12a4
另一种形式的斐波那契
public class Solution {
public int JumpFloor(int target) {
if (target==1 || target==0){
return 1;
}
else{
return JumpFloor(target-1)+JumpFloor(target-2);
}
}
}
举报
收藏
赞 14
评论加载中...