Breadth first search implementation
Applications:
- Finding all connected components in a graph
- Finding all nodes within one connected component
- Finding the shotest path between two nodes
- Testing a graph for bipartiteness
Source Code:
Github: BFS.java
Output:
BFS non-recursive : 0 1 3 2