A graph is a type of data structure capable of handling networks. Graphs are widely used across various domains such as the following:
Transportation: To find the shortest routes to travel between two places
Communication-signaling networks: To optimize the network of inter-connected computers and systems
Understanding relationships: To build relationship trees across families or organizations
Hydrology: To perform flow regime simulation analysis of various fluids
This current chapter will build fundamentals for graphs and the following topics will be covered:
Terminology and representations
Graph implementations
Graph traversals
Depth-first search
Breadth-first search
Topological sort
Shortest-paths problems
Single-source shortest paths
Minimum-cost spanning trees
Prim's algorithm
Kruskal's algorithm