Time Complexity of DFS is? (V – number of vertices, E – number of edges)
(a) O(V + E)
(b) O(V)
(c) O(E)
(d) O(V*E)
The question was asked in an interview for job.
This question is from Depth First Search topic in chapter Graph Search of Data Structures & Algorithms II