![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
剑指offer
那回頭的目光
这个作者很懒,什么都没留下…
展开
-
变态跳台阶
一只青蛙一次可以跳上1级台阶,也可以跳上2级……它也可以跳上n级。求该青蛙跳上一个n级的台阶总共有多少种跳法。 class Solution { public: int jumpFloorII(int number) { int t = 1; for(int i = 1 ; i<number ; i++){ t = t + jumpFl原创 2017-02-23 18:32:07 · 149 阅读 · 0 评论 -
矩形覆盖
题目描述 我们可以用2*1的小矩形横着或者竖着去覆盖更大的矩形。请问用n个2*1的小矩形无重叠地覆盖一个2*n的大矩形,总共有多少种方法? class Solution { public: int rectCover(int number) { int j1 = 1; int j2 = 2; if(number <=0)原创 2017-02-24 10:09:17 · 151 阅读 · 0 评论