Tavant interview question

Explain topological sort