递推套路
矩形覆盖
http://www.nowcoder.com/questionTerminal/72a5a919508a4251859fb2cfb987a0e6
跟跳台阶一样的解法,利用递推:
public class Solution { public int rectCover(int target) { if(target == 0) return 0; int a = 1, b = 1; for(int i = 1; i < target; i++){ a = a + b; b = a - b; } return a; } }