DS – Graph Operations

Graph Operations: The most common graph operations are:

  1. Check if the element is present in the graph
  2. Graph Traversal
  3. Add elements(vertex, edges) to graph
  4. Finding the path from one vertex to another

Structure representations:

  • We need to define 2 structures among one is representing the Node and the second one representing Edge.

How we construct the graph: Sample diagrams:

Scroll to Top