摘要:
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ... 阅读全文
posted @ 2015-06-05 19:20
TonyLuis
阅读(551)
评论(0)
推荐(0)
摘要:
A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index... 阅读全文
posted @ 2015-06-05 17:47
TonyLuis
阅读(312)
评论(0)
推荐(0)
摘要:
Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists: A: ... 阅读全文
posted @ 2015-06-05 17:19
TonyLuis
阅读(337)
评论(0)
推荐(0)
摘要:
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov... 阅读全文
posted @ 2015-06-05 17:04
TonyLuis
阅读(190)
评论(0)
推荐(0)
摘要:
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.Th... 阅读全文
posted @ 2015-06-05 16:49
TonyLuis
阅读(189)
评论(0)
推荐(0)
摘要:
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.Yo... 阅读全文
posted @ 2015-06-05 16:30
TonyLuis
阅读(207)
评论(0)
推荐(0)
摘要:
Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4],t... 阅读全文
posted @ 2015-06-05 11:51
TonyLuis
阅读(224)
评论(0)
推荐(0)
摘要:
Given an input string, reverse the string word by word. For example,Given s = "the sky is blue",return "blue is sky the".解题思路:本题方法多多,最简单的方式直接按“ ” spil... 阅读全文
posted @ 2015-06-05 10:23
TonyLuis
阅读(233)
评论(0)
推荐(0)
摘要:
Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another ex... 阅读全文
posted @ 2015-06-05 09:55
TonyLuis
阅读(172)
评论(0)
推荐(0)

浙公网安备 33010602011771号