码迷,mamicode.com
首页 >  
搜索关键字:爬楼梯    ( 227个结果
爬楼梯
package Maxmoney;public class Lchar{ public int climbStair(int t) { if(t == 0){ return 1; } int[] ST= new int[t+1]; ST[0] = 1; ST[1] = 1; for(int j=2; ...
分类:其他好文   时间:2017-03-09 13:07:05    阅读次数:147
爬楼梯
class Solution {public: /** * @param n: An integer * @return: An integer */ int climbStairs(int n) { // write your code here // write your code herein ...
分类:其他好文   时间:2017-03-09 00:32:46    阅读次数:133
删除有序数组的重复元素and爬楼梯and股票买入的最佳时期
1 #include "stdafx.h" #include"iostream" using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int a[10]={1,4,4,5,6,7,7,8,9,10}; int i=0; int j= ...
分类:编程语言   时间:2017-03-09 00:01:12    阅读次数:290
爬楼梯
class Solution { public: /** * @param n: An integer * @return: An integer */ int climbStairs(int n) { // write your code here if(n == 0) return 1; if(... ...
分类:其他好文   时间:2017-03-08 23:11:55    阅读次数:200
爬楼梯 - C++
class Solution {public: /** * @param n: An integer * @return: An integer */ int climbStairs(int n) { // write your code here int i,s[n]; if(n==0) retu ...
分类:编程语言   时间:2017-03-08 22:53:20    阅读次数:180
爬楼梯
public class Solution { /** * @param n: An integer * @return: An integer */ public int climbStairs(int n) { // write your code here int a=0,b=1,sum=0; ...
分类:其他好文   时间:2017-03-08 22:49:51    阅读次数:144
爬楼梯
class Solution {public:/*** @param n: An integer* @return: An integer*/ int climbStairs(int n) {// write your code hereint a = 1, b = 1, k = 0;if(n == ...
分类:其他好文   时间:2017-03-08 22:37:52    阅读次数:142
爬楼梯
class Solution { public: /** * @param n: An integer * @return: An integer */ int climbStairs(int n) { // write your code here if(n == 0) return 1; if( ...
分类:其他好文   时间:2017-03-08 21:16:12    阅读次数:116
3:爬楼梯
描述:假设你正在爬楼梯,需要n步你才能到达顶部。但每次你只能爬一步或者两步,你能有多少种不同的方法爬到楼顶部? 样例 比如n=3,1+1+1=1+2=2+1=3,共有3中不同的方法 返回 3 class Solution { public: /** * @param n: An integer * ...
分类:其他好文   时间:2017-03-08 21:12:08    阅读次数:148
爬楼梯
class Solution {public: /** * @param n: An integer * @return: An integer */ int climbStairs(int n) { // write your code here if(n==0) return 1; if(n<= ...
分类:其他好文   时间:2017-03-08 20:18:13    阅读次数:161
227条   上一页 1 ... 13 14 15 16 17 ... 23 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!