#algorithm #search #graph

idea

Parse a graph by processing the entire next level before recursing into the next one.

This can be done using a queue:

  1. Add root to queue.
  2. While queue has elements
  3. Pick first from queue
  4. Process element and mark as read
  5. Add all children.
  6. Loop.