• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅
2014年10月6日
Leetcode: Best Time to Buy and Sell Stock III
摘要: Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complet... 阅读全文
posted @ 2014-10-06 13:35 neverlandly 阅读(1412) 评论(0) 推荐(0)
Leetcode: Combination Sum II
摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each numb... 阅读全文
posted @ 2014-10-06 12:10 neverlandly 阅读(405) 评论(0) 推荐(0)
Leetcode: Next Permutation
摘要: 这道题的算法第一次可能有点难想,但是做过一次后就知道了 Shi Li Analysis(会好理解很多): Starting from the last position, the first time we find that num[i]<num[i+1], we stop. The positi 阅读全文
posted @ 2014-10-06 08:08 neverlandly 阅读(631) 评论(0) 推荐(0)
Leetcode: Merge Intervals
摘要: 这道题跟Insert Intervals这道题很像,最开头要先对Intervals里面的Interval排序一下,用到了java的Collections.sort(List<Interval> list, Comparator<? super Interval> c)。 排序以Interval的st 阅读全文
posted @ 2014-10-06 06:36 neverlandly 阅读(597) 评论(0) 推荐(1)
Leetcode: Minimum Window Substring
摘要: 难度:90 String问题里面有很多不好做的,动不动就DP什么的,参考了一些资料http://blog.csdn.net/fightforyourdream/article/details/17373203 For example,S = “ADOBECODEBANC”T = “ABC”Minim 阅读全文
posted @ 2014-10-06 01:45 neverlandly 阅读(597) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3