in Algorithms retagged by
330 views
0 votes
0 votes
Please list the problems where BFS alone can do and DFS alone can do and both can do??
in Algorithms retagged by
by
330 views

1 Answer

1 vote
1 vote
Bfs alone can find single source shortest path in undirected  unweighted connected graph.

BFS  and DFS can check if the graph is bipartite or not,find cycle in static graphs,check whether a node is reachable or not ,can check if graph is connected or not,and can find no of connected components

DFS alone can find cut nodes of a graph.

If a topological sort exists then no back edge is formed in DFS.

Dfs can alone check if the given graph is strongly connected or not

Related questions