next up previous
Next: Up: Previous:

BFS Data Structures

A node in a BF tree represents a vertex

pred
vertex
distance
visited



Use a queue to remember frontier of search



Note: Cormen et al.'s BFS algorithm uses color instead of visited.


next up previous
Next: Up: Previous: