Bloomberg Interview Question

Sorting algorithm / Tree Traversal question