0
Q:

dfs time complexity

The Time complexity of DFS is also O(V + E) when Adjacency List is used
and O(V^2) when Adjacency Matrix is used, where V stands for vertices and E 
stands for edges.
0

New to Communities?

Join the community