Topic description
We can use 2*1 small rectangles to cover larger rectangles horizontally or vertically. How many ways are there to cover a large 2*n rectangle with n small rectangles of 2*1 without overlapping?
class Solution { public: int rectCover(int number) { vector<int>vt; vt.push_back(1); vt.push_back(2); for(int i=2; i<number; i++) { vt.push_back(vt[i-1]+vt[i-2]); } return vt[number-1]; } };