A Graph is a data structure which consists of Vertices and Edges. The Vertices, also referred as Nodes and the edges are the lines that connects any two nodes. For e.g. in the below graph, elements 1, 2, 3, 4 are nodes and lines between 1-2, 2-3, 3-4, 4-1 and 1-3 are edges.

Graph representation with 4 nodes

A graph is represented with a notation as G = (V, E) where V is vertices and E are edges.

Contents

Below are some important types of graphs.

Below are some real world applications of Graphs.

Graph data structure is commonly represented using

Similar Articles

  1. Graph - Depth first search algorithm
  2. Graph - Breadth first search algorithm
  3. Graph - Dijkstra's shortest path algorithm
  4. Graph - Kruskal's minimum spanning tree algorithm
  5. Graph - Prim's minimum spanning tree algorithm