Pergunta de entrevista da empresa Bloomberg

Sorting algorithm / Tree Traversal question