Graphs Graphs are very important data structure. 

The graph data structure represents entities (nodes/vertices) and their relationships (edges), and it has many real-life equivalents where connections or networks matter. Common real-world examples include:

Sample Code

There are 2 major categories of graph:

There are 2 main ways of storing graph data: