MergeSort, BinTree to array and array to bin tree, find local minimum