Topic description
A frog can jump up 1 steps at a time, or 2 steps at a time. Find how many ways the frog can jump up a n-level stair.
class Solution { public: int jumpFloor(int number) { vector<int>vt; vt.push_back(1); vt.push_back(2); int i; for(i=2;i<number;i++){ vt.push_back(vt[i-1] + vt[i-2]); } return vt[number-1]; } };