Bloomberg interview question

Asked about how to make a binary tree into an array and then how to sort the array with binary search.