Pregunta de entrevista de Amazon

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