Breadth first search in graph

Problem

Finding a vertex (node) in a graph based on breadth first traversal.

Use-cases

  • Finding a file within a hard drive in a file system where you know the file you search for lies somewhere shallow inside.
  • Shortest path between
read the rest.

Depth first search in graph

Problem

Finding a vertex (node) in a graph based on depth first traversal.

Use-cases

  • Finding a file within a hard drive in a file system where you know the file you search for lies somewhere deep inside.
  • Path finding between
read the rest.