摘要:
Remove Node in Binary Search TreeGiven a root of Binary Search Tree with unique value for each node. Remove the node with given value. If there is no ... 阅读全文
posted @ 2015-07-09 22:29
Eason Liu
阅读(743)评论(0)推荐(0)
编辑
摘要:
Power of TwoGiven an integer, write a function to determine if it is a power of two.Credits:Special thanks to@jianchao.li.fighterfor adding this probl... 阅读全文
posted @ 2015-07-06 20:36
Eason Liu
阅读(198)评论(0)推荐(0)
编辑
摘要:
Kth Smallest Element in a BSTGiven a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is alw... 阅读全文
posted @ 2015-07-02 14:54
Eason Liu
阅读(1173)评论(0)推荐(0)
编辑
摘要:
Count PairsDescriptionYou are given n circles centered on Y-aixs. The ith circle’s center is at point (i, 0) and its radius is A[i]. Count the number ... 阅读全文
posted @ 2015-07-01 23:27
Eason Liu
阅读(293)评论(0)推荐(0)
编辑
摘要:
Find the Weak Connected Component in the Directed GraphFind the number Weak Connected Component in the directed graph. Each node in the graph contains... 阅读全文
posted @ 2015-06-29 13:34
Eason Liu
阅读(1424)评论(0)推荐(0)
编辑
摘要:
Majority Element IIGiven an integer array of sizen, find all elements that appear more than⌊ n/3 ⌋times. The algorithm should run in linear time and i... 阅读全文
posted @ 2015-06-29 10:44
Eason Liu
阅读(261)评论(0)推荐(0)
编辑
摘要:
Find the Connected Component in the Undirected GraphFind the number connected component in the undirected graph. Each node in the graph contains a lab... 阅读全文
posted @ 2015-06-28 22:37
Eason Liu
阅读(1331)评论(0)推荐(1)
编辑
摘要:
Summary RangesGiven a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->5",... 阅读全文
posted @ 2015-06-26 13:48
Eason Liu
阅读(638)评论(0)推荐(0)
编辑