Graphs as Data Structures
What are Graphs?
Graphs in data structures are non-linear data structures made up of a finite number of nodes or vertices and the edges that connect them. Graphs in data structures are used to address real-world problems in which it represents the problem area as a network like telephone networks, circuit networks, and social networks.
Various types of Graph
- Directed Graph: Edges have a direction.
- Undirected Graph: Edges have no direction.
- Weighted Graph: Edges have weights associated with them.
- Unweighted Graph: Edges do not have any weights.
- Connected Graph: There is a path between every two vertices.
- Disconnected Graph: Some vertices are not connected by a path.
Learn more about graphs
here.