题解 | #矩形覆盖#
矩形覆盖
http://www.nowcoder.com/practice/72a5a919508a4251859fb2cfb987a0e6
public:
int rectCover(int number) {
if(number==0){
return 0;
}
else if(number==1){
return 1;
}
else if(number==2){
return 2;
}
else{
return rectCover(number-1)+rectCover(number-2);
}
}
};