1 class Solution { 2 public: 3 int jumpFloorII(int number) { 4 if(number==1) 5 return 1; 6 if(number==2) 7 return 2; 8 return 2*jumpFloorII(number-1); 9 10 } 11 };
1 class Solution { 2 public: 3 int jumpFloorII(int number) { 4 if(number==1) 5 return 1; 6 if(number==2) 7 return 2; 8 return 2*jumpFloorII(number-1); 9 10 } 11 };