Graph is a non-linear data structure made up of nodes/vertices and edges.It does not have a root node and can be traversed in any direction.A graph consists of vertices and edges, and can be directed or undirected.Graphs are used for various purposes like finding minimum distance between cities, connecting places in a map, and in social media.