Apple Interview Question

BFS/DFS in trees, heap sort