Lime interview question

Topological sorting using indegree-based algorithm