Timo66

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2018年10月1日

摘要: Min Cost Climbing Stairs https://leetcode.com/problems/min-cost-climbing-stairs/ On a staircase, the i-th step has some non-negative cost cost[i] assi 阅读全文
posted @ 2018-10-01 00:16 Timo66 阅读(243) 评论(0) 推荐(0) 编辑

2018年9月30日

摘要: 今天博主立下一个flag,必须要开始好好解决DP问题!!LC现在DP系列有117题,现在从易到难的顺序重走这117之路。 今天坐在Victoria coffee 里面从第一个最简单的paint house问题解决开始。 ps:这里都是博主自己做题时的思考过程,不是大神讲解,欢迎指正缺陷和错误。 Pa 阅读全文
posted @ 2018-09-30 13:01 Timo66 阅读(357) 评论(0) 推荐(0) 编辑

2018年9月8日

摘要: Binary search 是最简单也十分常用的一种算法,能把O(n) 的搜索降到O(logn)这个帖子的总结是参考大神Grandyang的,甚至很多地方是直接抄袭过来,原贴在这里http://www.cnblogs.com/grandyang/p/6854825.html Binary Searc 阅读全文
posted @ 2018-09-08 13:42 Timo66 阅读(1032) 评论(0) 推荐(0) 编辑

2018年9月4日

该文被密码保护。 阅读全文
posted @ 2018-09-04 01:31 Timo66 阅读(0) 评论(0) 推荐(0) 编辑

2015年9月5日

摘要: Question 1Binary Tree Preorder TraversalGiven a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, ... 阅读全文
posted @ 2015-09-05 10:33 Timo66 阅读(157) 评论(0) 推荐(0) 编辑

2015年8月31日

摘要: CombinationQuestion 1CombinationsGiven two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solu... 阅读全文
posted @ 2015-08-31 14:37 Timo66 阅读(167) 评论(0) 推荐(0) 编辑

2015年8月26日

摘要: palindromeQuestion 1Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length o... 阅读全文
posted @ 2015-08-26 00:12 Timo66 阅读(218) 评论(0) 推荐(0) 编辑

2015年8月21日

摘要: String to Integer (atoi) / valid numberQuestion 1String to Integer (atoi)Implementatoito convert a string to an integer.Hint:Carefully consider all po... 阅读全文
posted @ 2015-08-21 15:55 Timo66 阅读(162) 评论(0) 推荐(0) 编辑

2015年8月17日

摘要: Reverse num/word/bits最近回国了 有点懒Question 1Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Be caref... 阅读全文
posted @ 2015-08-17 10:21 Timo66 阅读(161) 评论(0) 推荐(0) 编辑

2015年7月30日

摘要: Binary search in sorted ArrayQuestion 1Median of Two Sorted ArraysThere are two sorted arraysnums1andnums2of size m and n respectively. Find the media... 阅读全文
posted @ 2015-07-30 09:59 Timo66 阅读(281) 评论(0) 推荐(0) 编辑