...

/

Depth First Traversal of Graph

Depth First Traversal of Graph

In this lesson, we will learn about depth first traversal of graph using recursion.

What is a Graph?

Graphs represent pairwise relationships between objects. Graphs are mathematical structures and therefore can be visualized by using two basic components, nodes and edges

A node, also known as a vertex, is a fundamental part of a graph. It is the entity that has a name, known as the key, and other information related to that entity. A relationship between nodes is expressed using edges. An edge between two nodes expresses a one-way or two-way relationship between the nodes.

Graphs can be represented as Adjacency Matrix or Adjacency ...