摘要:
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum element.You m... 阅读全文
摘要:
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.思路:分治。将当前区间的中点给当前node,然后左区间中点为left,右区间中点为right。以下为AC代... 阅读全文