Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 1.04 KB

README.md

File metadata and controls

22 lines (16 loc) · 1.04 KB

BFS + DFS

Code + PPT + Video for the Breadth-first Search (BFS) Algorithm.

BFS General Algorithm

  • Add starting point to the queue
  • Iterate while the queue is not empty
    • Remove top coordinate from queue
    • If coordinate has been visited already: skip the below steps
    • Set coordinate to visited
    • Add all adjacent coordinates to the queue.