会员
众包
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
哥不帅丨但很坏
Powered by
博客园
博客园
|
首页
|
新随笔
|
联系
|
订阅
|
管理
2017年3月7日
爬楼梯
摘要: class Solution { public: int climbStairs(int n) { using namespace std; int a=1,b=1,number=0; if(n==0||n==1) { return 1; } while(n>1) ...
阅读全文
posted @ 2017-03-07 23:08 热爱电竞的程序员
阅读(111)
评论(0)
推荐(1)
编辑
买卖股票的最佳时机
摘要: class Solution { public: int maxProfit(vector &prices) { using namespace std; int profit=0; if(prices.size()<2) { return profit; } e...
阅读全文
posted @ 2017-03-07 23:07 热爱电竞的程序员
阅读(118)
评论(0)
推荐(0)
编辑
删除排序数组中的重复数字
摘要: public class Solution { public int removeDuplicates(int[] nums) { int size=nums.length; for(int i=0;i<size-1;i++) { if(nums[i]==nums[i+1]) { for(in...
阅读全文
posted @ 2017-03-07 23:06 热爱电竞的程序员
阅读(101)
评论(0)
推荐(0)
编辑