Perform a Breadth-First Scan of a Graph

Below is a breadth-first traversal of a hypercube.