The time complexity for depth first search and breadth first search worst case
Answers
Answered by
3
Answer:
Complexity of Depth-first Search
Depth-first search visits every vertex once and checks every edge in the graph once. Therefore, DFS complexity is O ( V + E ) O(V + E) O(V+E).
Similar questions