上一页 1 2 3 4 5 6 7 ··· 9 下一页

2016年1月6日

摘要: Binary Tree Level Order Traversal IIGiven a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level... 阅读全文
posted @ 2016-01-06 03:31 一心一念 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Implement Queue by Two StacksAs the title described, you should only use two stacks to implement a queue's actions.The queue should support push(eleme... 阅读全文
posted @ 2016-01-06 02:16 一心一念 阅读(143) 评论(0) 推荐(0) 编辑

2016年1月5日

摘要: Roman to IntegerGiven a roman numeral, convert it to an integer.The answer is guaranteed to be within the range from 1 to 3999.ExampleIV -> 4XII -> 12... 阅读全文
posted @ 2016-01-05 06:53 一心一念 阅读(140) 评论(0) 推荐(0) 编辑

2015年12月19日

摘要: Digit CountsCount the number of k's between 0 and n. k can be 0 - 9.Exampleif n=12, k=1 in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], we have FIVE 1'... 阅读全文
posted @ 2015-12-19 03:40 一心一念 阅读(219) 评论(0) 推荐(0) 编辑
摘要: AnagramsGiven an array of strings, return all groups of strings that are anagrams.ExampleGiven ["lint", "intl", "inlt", "code"], return ["lint", "inlt... 阅读全文
posted @ 2015-12-19 03:27 一心一念 阅读(227) 评论(0) 推荐(0) 编辑

2015年12月18日

摘要: k SumGiven n distinct positive integers, integer k (k <= n) and a number target.Find k numbers where sum is target. Calculate how many solutions there... 阅读全文
posted @ 2015-12-18 07:01 一心一念 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Maximum Subarray DifferenceGiven an array with integers.Find two non-overlapping subarrays A and B, which |SUM(A) - SUM(B)| is the largest.Return the ... 阅读全文
posted @ 2015-12-18 06:59 一心一念 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Delete DigitsGiven string A representative a positive integer which has N digits, remove any k digits of the number, the remaining digits are arranged... 阅读全文
posted @ 2015-12-18 04:44 一心一念 阅读(280) 评论(0) 推荐(0) 编辑
摘要: Maximum Subarray IIGiven an array of integers, find two non-overlapping subarrays which have the largest sum. The number in each subarray should be co... 阅读全文
posted @ 2015-12-18 03:52 一心一念 阅读(233) 评论(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-12-18 02:42 一心一念 阅读(133) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页

导航