题解 | #跳台阶扩展问题#
跳台阶扩展问题
http://www.nowcoder.com/practice/22243d016f6b47f2a6928b4313c85387
class Solution {
public:
int jumpFloorII(int number) {
if(number==1) return 1;
int sum = 1;
for(int i = 1; i<=number-1; i++){
sum += jumpFloorII(i);
}
return sum;
}
};