Revolent interview question

Sort an array using binary tree.