Amazon interview question

Convert a tree into minheap ??