• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅
2015年12月31日
Leetcode: Coin Change
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee... 阅读全文
posted @ 2015-12-31 14:07 neverlandly 阅读(366) 评论(0) 推荐(0)
Leetcode: Best Time to Buy and Sell Stock with Cooldown
摘要: 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 @ 2015-12-31 13:15 neverlandly 阅读(870) 评论(0) 推荐(0)
Leetcode: Sparse Matrix Multiplication
摘要: Given two sparse matrices A and B, return the result of AB.You may assume that A's column number is equal to B's row number.Example:A = [ [ 1, 0, 0],... 阅读全文
posted @ 2015-12-31 07:57 neverlandly 阅读(2555) 评论(0) 推荐(0)
Leetcode: Expression Add Operators
摘要: 参考http://segmentfault.com/a/1190000003797204 and http://blog.csdn.net/u013027996/article/details/48713751 深度优先搜索 复杂度 时间 O(N^2) 空间 O(N) 思路 因为要输出所有可能的情况 阅读全文
posted @ 2015-12-31 07:13 neverlandly 阅读(331) 评论(0) 推荐(0)
Leetcode: Remove Invalid Parentheses
摘要: Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note: The input string may cont 阅读全文
posted @ 2015-12-31 02:34 neverlandly 阅读(1484) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3