Breadth first search is a very common graph algorithm. Some of the applications of the algorithm includes :
- shortest path in an unweighted graph
- 0-1 BFS
- sorting the nodes in an increasing order of their distance from the starting node
In this video, we have discussed how to code up the algorithm in O(V+E) time using given an adjacency list representation of the graph.
#programming #coding #competitiveprogramming #datastructure
Follow us on Instagram
[ Ссылка ]
Ещё видео!