Given a Directed Acyclic Graph (DAG) with V vertices and E edges, return a linear ordering of vertices such that for every directed edge (u, v), vertex u comes before v in the ordering. If there are…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.