摘要:
Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, ... 阅读全文
摘要:
Rotate ImageYou are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?SOL... 阅读全文
摘要:
8个月从CS菜鸟到拿到Google Offer的经历+内推http://blog.csdn.net/fightforyourdream/article/details/17094127http://www.1point3acres.com/bbs/forum.php?mod=viewthread&t... 阅读全文
摘要:
Divide Two IntegersDivide two integers without using multiplication, division and mod operator.SOLUTION 11. 基本思想是不断地减掉除数,直到为0为止。但是这样会太慢。2. 我们可以使用2分法来加... 阅读全文
摘要:
Find Minimum in Rotated Sorted Array II Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-... 阅读全文
摘要:
Find Minimum in Rotated Sorted ArrayQuestion SolutionSuppose a sorted array is rotated at some pivot unknown to youbeforehand.(i.e., 0 1 2 4 5 6 7 mig... 阅读全文
摘要:
CandyThere are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the followin... 阅读全文
摘要:
引自:http://www.douban.com/note/330562764/注:此分类仅供大概参考,没有精雕细琢。有不同意见欢迎评论~利用堆栈:http://oj.leetcode.com/problems/evaluate-reverse-polish-notation/http://oj.l... 阅读全文
摘要:
Sort ColorsGiven an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the ... 阅读全文
摘要:
Search for a RangeGiven a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity ... 阅读全文