Amazon Interview Question

Sorting - 1st Round Tree and Graphs - 2nd round