Graph Traversal Algorithms

In this lesson, we will learn the basic logic behind graph traversal, and we will see how it applies to the two most famous graph traversal algorithms.

Types of Graph Traversals #

There are two basic techniques used for graph traversal:

  1. Breadth-First Search (BFS)
  2. Depth-First Search (DFS)

In order to understand these algorithms, we will have to view graphs from a slightly different perspective.

Any traversal needs a starting point, but a graph does not have a ...