摘要:
Search in Rotated Sorted ArraySuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).... 阅读全文
摘要:
Find Minimum in Rotated Sorted Array IIFollow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time... 阅读全文
摘要:
Find Minimum in Rotated Sorted ArraySuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0... 阅读全文
摘要:
Implement Queue using StacksImplement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes... 阅读全文
摘要:
Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.... 阅读全文
摘要:
Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.BST的规则就是左& ... 阅读全文
摘要:
Maximum Product SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given... 阅读全文
摘要:
Product of Array Except SelfGiven an array ofnintegers wheren> 1,nums, return an arrayoutputsuch thatoutput[i]is equal to the product of all the eleme... 阅读全文