摘要:
Binary Tree Level Order Traversal IIGiven a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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'... 阅读全文
摘要:
AnagramsGiven an array of strings, return all groups of strings that are anagrams.ExampleGiven ["lint", "intl", "inlt", "code"], return ["lint", "inlt... 阅读全文
摘要:
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... 阅读全文
摘要:
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 ... 阅读全文
摘要:
Delete DigitsGiven string A representative a positive integer which has N digits, remove any k digits of the number, the remaining digits are arranged... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文