2017年3月8日

爬楼梯

摘要: 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 <= 2)... 阅读全文

posted @ 2017-03-08 21:39 流-萤 阅读(120) 评论(0) 推荐(0) 编辑

买卖股票的最佳时机

摘要: class Solution { public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector &prices) { // write your code here int maxpro... 阅读全文

posted @ 2017-03-08 21:38 流-萤 阅读(135) 评论(0) 推荐(0) 编辑

删除排序数组中的重复数字

摘要: class Solution { public: /** * @param A: a list of integers * @return : return an integer */ int removeDuplicates(vector &nums) { // write your code here int long... 阅读全文

posted @ 2017-03-08 21:36 流-萤 阅读(127) 评论(0) 推荐(0) 编辑

导航