Software Engineer Study Guide — Depth First Search vs. Breadth First Search

All About Code
Oct 27, 2020

Depth First Search

  • Uses a Stack data structure
  • It is an edge based technique
  • It performs two stages, first visited
  • Might traverse through more edges to reach a destination vertex from a source
  • Is more suitable when there are solutions away from the source
  • Is more suitable for game or puzzle problems. We make a decision then explore all paths through this decision. And if this…

--

--