What is Graph Data Structure? Last Updated : 07 Jul, 2023 Comments Improve Suggest changes Like Article Like Report A Graph is a non-linear data structure consisting of vertices and edges. The vertices are sometimes also referred to as nodes and the edges are lines or arcs that connect any two nodes in the graph. More formally a Graph is composed of a set of vertices( V ) and a set of edges( E ). The graph is denoted by G(E, V). Components of a GraphVertices: Vertices are the fundamental units of the graph. Sometimes, vertices are also known as vertices or nodes. Every node/vertex can be labeled or unlabelled.Edges: Edges are drawn or used to connect two nodes of the graph. It can be ordered pair of nodes in a directed graph. Edges can connect any two nodes in any possible way. There are no rules. Sometimes, edges are also known as arcs. Every edge can be labeled/unlabelled.Types Of GraphNull Graph: A graph is known as a null graph if there are no edges in the graph.Trivial Graph: Graph having only a single vertex, it is also the smallest graph possible.Undirected Graph: A graph in which edges do not have any direction. That is the nodes are unordered pairs in the definition of every edge. Directed Graph: A graph in which edge has direction. That is the nodes are ordered pairs in the definition of every edge.Connected Graph: The graph in which from one node we can visit any other node in the graph is known as a connected graph. Disconnected Graph: The graph in which at least one node is not reachable from a node is known as a disconnected graph.Regular Graph: The graph in which the degree of every vertex is equal to K is called K regular graph.Complete Graph: The graph in which from each node there is an edge to each other node.Cycle Graph: The graph in which the graph is a cycle in itself, the degree of each vertex is 2. Cyclic Graph: A graph containing at least one cycle is known as a Cyclic graph.Directed Acyclic Graph: A Directed Graph that does not contain any cycle. Bipartite Graph: A graph in which vertex can be divided into two sets such that vertex in each set does not contain any edge between them.Weighted Graph: A graph in which the edges are already specified with suitable weight is known as a weighted graph. Weighted graphs can be further classified as: directed weighted graphs and undirected weighted graphs. Comment More infoAdvertise with us Next Article What is Graph Data Structure? C code_r Follow Improve Article Tags : Graph DSA Practice Tags : Graph Similar Reads What is Data Structure? A data structure is a way of organizing and storing data in a computer so that it can be accessed and used efficiently. It refers to the logical or mathematical representation of data, as well as the implementation in a computer program.Classification:Data structures can be classified into two broad 2 min read Graph Data Structure Graph Data Structure is a collection of nodes connected by edges. It's used to represent relationships between different entities. If you are looking for topic-wise list of problems on different topics like DFS, BFS, Topological Sort, Shortest Path, etc., please refer to Graph Algorithms. Basics of 3 min read Graph terminology in data structure Graphs are fundamental data structures in various computer science applications, including network design, social network analysis, and route planning. Understanding graph terminology is crucial for effectively navigating and manipulating graph data structures. In this article, we will discuss the g 5 min read Introduction to Graph Data Structure Graph Data Structure is a non-linear data structure consisting of vertices and edges. It is useful in fields such as social network analysis, recommendation systems, and computer networks. In the field of sports data science, graph data structure can be used to analyze and understand the dynamics of 15+ min read Tree Data Structure Tree Data Structure is a non-linear data structure in which a collection of elements known as nodes are connected to each other via edges such that there exists exactly one path between any two nodes.Basics of Tree Data StructureIntroduction to TreeTypes of Trees in Data StructuresApplications of tr 4 min read Like