0.4.2.2 Breadthfirst traversal
Like a depthfirst traversal, breadthfirst traversal algorithms visit
each node in a connected graph. However, when a breadthfirst traversal
arrives at a certain node, v, it visits all neighbors of node v before
continuing to process other, more distant, parts of the graph. Whereas a
depth first traversal can be implemented recursively, a breadthfirst
search is not naturally recursive. Instead of using a stack data structure,
breadthfirst traversal usually makes use of a queue. A queue is much like
a line of people; it operates on a FIFO (first in first out) or ``first
come, first served'' principle.
The actual traversal procedure begins by enqueueing the starting node.
Then the following process repeats:
 Dequeue a current node
 Enqueue all nonvisited nodes adjacent to the current node
 Mark nonvisited nodes adjacent to the current node visited
The above cycle repeats until the queue becomes empty.
void bf_traverse (int vertex) {
link t;
