标签:offer color content 跳台阶 描述 class nbsp question tar
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); } } }
标签:offer color content 跳台阶 描述 class nbsp question tar
原文地址:https://www.cnblogs.com/goodtest2018/p/12701593.html