Back to the 2023 paper

Module 3: Graph and Tree Algorithms

20232m

What is the time complexity of topological sorting of a directed acyclic graph (DAG) with VV vertices and EE edges using Depth-First Search (DFS)?
(i) O(V2)O(V^2)
(ii) O(E2)O(E^2)
(iii) O(V+E)O(V+E)
(iv) O(V.E)O(V.E)

Similar questions