I know BFS can be used to find shortest path from source to destination in an unweighted and undirected graph . But I wanted to know if BFS can also be used for unweighted and directed graphs or not ?
CodePudding user response:
Yes, the BFS algorithm works for every graph with unweighted edges.
Thus it can be used for a graph with directed edges as well as long as it does not contain any weights.