摘要:
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",... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文