Breadth-First Search

  • A single FIFO queue, storing vertices at distance and then .
  • Enqueue every white vertex exactly once, blacken them when they are dequeued.
  • .
  • Breadth-first tree, also determines a shortest-path on unweighted graphs. Predecessor subgraph
  • Defined as starting from one source only.