摘要:
Find the Duplicate NumberGiven an arraynumscontainingn+ 1 integers where each integer is between 1 andn(inclusive), prove that at least one duplicate ... 阅读全文
posted @ 2015-09-28 13:41
Eason Liu
阅读(436)评论(0)推荐(0)
编辑
摘要:
Walls and GatesYou are given am x n2D grid initialized with these three possible values.-1- A wall or an obstacle.0- A gate.INF- Infinity means an emp... 阅读全文
posted @ 2015-09-25 13:02
Eason Liu
阅读(658)评论(0)推荐(0)
编辑
摘要:
Expression Add OperatorsGiven a string that contains only digits0-9and a target value, return all possibilities to addbinaryoperators (not unary)+,-, ... 阅读全文
posted @ 2015-09-22 16:43
Eason Liu
阅读(423)评论(0)推荐(0)
编辑
摘要:
Inorder Successor in BSTGiven a binary search tree and a node in it, find the in-order successor of that node in the BST.Note: If the given node has n... 阅读全文
posted @ 2015-09-22 14:47
Eason Liu
阅读(688)评论(0)推荐(0)
编辑
摘要:
Peeking IteratorGiven an Iterator class interface with methods:next()andhasNext(), design and implement a PeekingIterator that support thepeek()operat... 阅读全文
posted @ 2015-09-21 18:40
Eason Liu
阅读(363)评论(0)推荐(0)
编辑
摘要:
Single Number IIIGiven an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find t... 阅读全文
posted @ 2015-09-16 00:11
Eason Liu
阅读(205)评论(0)推荐(0)
编辑
摘要:
Zigzag IteratorGiven two 1d vectors, implement an iterator to return their elements alternately.For example, given two 1d vectors:v1 = [1, 2]v2 = [3, ... 阅读全文
posted @ 2015-09-14 13:02
Eason Liu
阅读(640)评论(0)推荐(0)
编辑