Vidyalelo
Data Structure · Q112

Graph Algorithms (DFS, BFS, Dijkstras, etc)

Programming · Data Structure · question 112

Q112

What will be the time complexity of the iterative depth first traversal code(V=no. of vertices E=no.of edges)?

A.
O(V+E)
Answer
B.
O(V)
C.
O(E)
D.
O(V*E)

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board