Snap interview question

topological sort