class Solution { public: int jumpFloor(int number) { // if (number == 1) { return 1; } else if (number == 2) { return 2; } else { return(jumpFloor(number - 1) + jumpFloor(number - 2)); } } };
剑指offer---跳台阶
原文:http://www.cnblogs.com/159269lzm/p/7260703.html