Breadth-First Search (BFS)

Objective:
Given a graph and a vertex S, discover every vertex in the graph reachable from S.

Strategy:
Discover all vertices at distance k from S before discovering any vertex at distance k+1.

Side Effects:
  1. The shortest-path distance from S to all vertices is found
  2. A breadth-first tree is constructed