public class Solution {
public int jumpFloor(int target) {
if(target==0){
return 1;
}else if(target==1){
return 1;
}else if(target==2){
return 2;
}else{
return jumpFloor(target-1)+jumpFloor(target-2);
}
}
}
2021-11-25(JZ69 跳台阶)
最新推荐文章于 2024-05-30 20:15:33 发布