1 Answers
One graph is an ideal data structure that is utilized to perform the mathematical theory of graphs. It is primarily a set of vertices (also called nodes) and edges that join these vertices. A graph is usually viewed as a generalization of the tree building, where instead of becoming a purely parent-to-child the connection between tree nodes, any variety of complex relationships can exist. Graphs are generally used to model any situation where things are related to each other in pairs.