- Initialize the first node’s dist number and place in queue
- Repeat until all nodes have been examined
- Remove current node to be examined from queue
- Find all unlabeled nodes adjacent to current node
- If this is an unvisited node label it and add it to the queue
- Finished.
Write BFS algorithm
September 14, 2023 in Data Structure