摘要:
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-07-08 21:08
陆草纯
阅读(453)
评论(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-07-08 18:04
陆草纯
阅读(477)
评论(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-08 10:45
陆草纯
阅读(335)
评论(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-08 09:49
陆草纯
阅读(274)
评论(0)
推荐(0)