Posts

GRAPHS IN DATA STRUCTURE

Image
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. For example, it can represent a single user as nodes or vertices in a telephone network, while the link between them via telephone represents edges. What Are Graphs in Data Structure? A graph is a non-linear kind of data structure made up of nodes or vertices and edges. The edges connect any two nodes in the graph, and the nodes are also known as vertices. This graph has a set of vertices V= { 1,2,3,4,5} and a set of edges E= { (1,2),(1,3),(2,3),(2,4),(2,5),(3,5),(4,50 }. Now that you’ve learned about the definition of graphs in data structures, you will learn about their various types. Types of Graphs in Data Structures There are different types of graphs i