代码很简单 找规律看懂就好了
跳台阶
http://www.nowcoder.com/questionTerminal/8c82a5b80378478f9484d87d1c5f12a4
public class Solution {
public int JumpFloor(int target) {
if(target<=0){
return 0;
}else if(target==1){
return 1;
}else if(target==2){
return 2;
}
return JumpFloor(target-1)+JumpFloor(target-2);
}
}