Computer Science, asked by tanvikreddy123, 7 months ago

The time complexity for depth first search and breadth first search worst case​

Answers

Answered by aryavarnika964
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