2015年1月3日

摘要: First Missing PositiveGiven an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Yo... 阅读全文
posted @ 2015-01-03 22:45 Yu's Garden 阅读(5242) 评论(4) 推荐(0) 编辑
摘要: Best Time to Buy and Sell Stock IIIQuestion SolutionSay you have an array for which the ith element is the price of a given stock on day i.Design an a... 阅读全文
posted @ 2015-01-03 18:51 Yu's Garden 阅读(791) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell Stock IIQuestion SolutionSay you have an array for which the ith element is the price of a given stock on day i.Design an al... 阅读全文
posted @ 2015-01-03 18:39 Yu's Garden 阅读(618) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell StockSay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to compl... 阅读全文
posted @ 2015-01-03 18:34 Yu's Garden 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cnblogs.com/pkuoliver/archive/2010/10/06/sotry-about-sqrt.html源码下载地址:http://diducoder.com/sotry-about-sqrt.html好吧,我承认我标题党了,不过既然你来了,就认真看下... 阅读全文
posted @ 2015-01-03 16:44 Yu's Garden 阅读(438) 评论(0) 推荐(0) 编辑
摘要: Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:You may assu... 阅读全文
posted @ 2015-01-03 16:36 Yu's Garden 阅读(374) 评论(0) 推荐(0) 编辑
摘要: Longest Common Subsequence原题链接:http://lintcode.com/zh-cn/problem/longest-common-subsequence/Given two strings, find the longest comment subsequence (L... 阅读全文
posted @ 2015-01-03 15:00 Yu's Garden 阅读(3898) 评论(0) 推荐(0) 编辑
摘要: Longest Common Substring原题链接:http://lintcode.com/zh-cn/problem/longest-common-substring/#Given two strings, find the longest common substring.Return t... 阅读全文
posted @ 2015-01-03 14:32 Yu's Garden 阅读(2973) 评论(0) 推荐(0) 编辑
摘要: Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume... 阅读全文
posted @ 2015-01-03 00:39 Yu's Garden 阅读(370) 评论(0) 推荐(0) 编辑

导航