摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
今天博主立下一个flag,必须要开始好好解决DP问题!!LC现在DP系列有117题,现在从易到难的顺序重走这117之路。 今天坐在Victoria coffee 里面从第一个最简单的paint house问题解决开始。 ps:这里都是博主自己做题时的思考过程,不是大神讲解,欢迎指正缺陷和错误。 Pa 阅读全文
摘要:
Binary search 是最简单也十分常用的一种算法,能把O(n) 的搜索降到O(logn)这个帖子的总结是参考大神Grandyang的,甚至很多地方是直接抄袭过来,原贴在这里http://www.cnblogs.com/grandyang/p/6854825.html Binary Searc 阅读全文
摘要:
Question 1Binary Tree Preorder TraversalGiven a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, ... 阅读全文
摘要:
CombinationQuestion 1CombinationsGiven two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solu... 阅读全文
摘要:
palindromeQuestion 1Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length o... 阅读全文
摘要:
String to Integer (atoi) / valid numberQuestion 1String to Integer (atoi)Implementatoito convert a string to an integer.Hint:Carefully consider all po... 阅读全文
摘要:
Reverse num/word/bits最近回国了 有点懒Question 1Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Be caref... 阅读全文
摘要:
Binary search in sorted ArrayQuestion 1Median of Two Sorted ArraysThere are two sorted arraysnums1andnums2of size m and n respectively. Find the media... 阅读全文
|