我们可以用2*1的小矩形横着或者竖着去覆盖更大的矩形. 请问用n个2*1的小矩形无重叠地覆盖一个2*n的大矩形,总共有多少种方法? 是不是发现看不懂,哈哈:编程题就是这样,一定要归纳,手写过程: n = 1,则 1; n = 2.则1,1横1,1竖:是不是有点眼熟: n= 3,则1,1,1横,1,1横1竖,1竖1,1,横:...还要再说么? 注意不能省2,因为0为0: public class Solution { public int RectCover(int target) { if(ta
Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. If the node has two sub-nodes, then this node's value is the smaller value among its two sub-nodes.