Graph Data Structure And AlgorithmsLast Updated : 26 Sep, 2023ReadDiscuss(20+)CoursesDSA for BeginnersLearn more about Graph in DSA Self Paced CoursePractice Problems on GraphsWhat is Graph Data Structure?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 vertex 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.Graphs are used to solve many real-life problems. Graphs are used to represent networks. The networks may include paths in a city or telephone network or circuit network. Graphs are also used in social networks like linkedIn, Facebook. For example, in Facebook, each person is represented with a vertex(or node). Each node is a structure and contains information like person id, name, gender, locale etc.Topics:IntroductionBFS & DFS in GraphCycles in GraphShortest Paths in GraphMinimum Spanning TreeTopological SortingConnectivityMaximum FlowSome must do problems on GraphSome QuizzesIntroduction:Introduction to GraphsGraph and its representationsTypes of Graphs with ExamplesBasic Properties of a GraphApplications, Advantages and Disadvantages of GraphTranspose graphDifference between graph and treeBFS and DFS in Graph:Breadth First Traversal for a GraphDepth First Traversal for a GraphApplications of Depth First SearchApplications of Breadth First TraversalIterative Depth First SearchBFS for Disconnected GraphTransitive Closure of a Graph using DFSDifference between BFS and DFSCycles in Graph:Detect Cycle in a Directed GraphDetect cycle in an undirected graphDetect cycle in a direct graph using colorsDetect a negative cycle in a Graph | (Bellman Ford)Cycles of length n in an undirected and connected graphDetecting negative cycle using Floyd WarshallClone a Directed Acyclic GraphUnion By Rank and Path Compression in Union-Find AlgorithmIntroduction to Disjoint Set Data Structure or Union-Find AlgorithmShortest Path in Graph:Dijkstra’s shortest path algorithmBellman–Ford AlgorithmFloyd Warshall AlgorithmJohnson’s algorithm for All-pairs shortest pathsShortest Path in Directed Acyclic GraphDial’s AlgorithmMultistage Graph (Shortest Path)Shortest path in an unweighted graphKarp’s minimum mean (or average) weight cycle algorithm0-1 BFS (Shortest Path in a Binary Weight Graph)Find minimum weight cycle in an undirected graphMinimum Spanning Tree:Prim’s Minimum Spanning Tree (MST)Kruskal’s Minimum Spanning Tree AlgorithmDifference between Prim’s and Kruskal’s algorithm for MSTApplications of Minimum Spanning Tree ProblemMinimum cost to connect all citiesTotal number of Spanning Trees in a GraphMinimum Product Spanning TreeReverse Delete Algorithm for Minimum Spanning TreeBoruvka’s algorithm for Minimum Spanning TreeTopological Sorting:Topological SortingAll topological sorts of a Directed Acyclic GraphKahn’s Algorithm for Topological SortingMaximum edges that can be added to DAG so that is remains DAGLongest Path in a Directed Acyclic GraphTopological Sort of a graph using departure time of vertexConnectivity:Articulation Points (or Cut Vertices) in a GraphBiconnected ComponentsBridges in a graphEulerian path and circuitFleury’s Algorithm for printing Eulerian Path or CircuitStrongly Connected ComponentsCount all possible walks from a source to a destination with exactly k edgesEuler Circuit in a Directed GraphLength of shortest chain to reach the target wordFind if an array of strings can be chained to form a circleTarjan’s Algorithm to find strongly connected ComponentsPaths to travel each nodes using each edge (Seven Bridges of Königsberg)Dynamic Connectivity | Set 1 (Incremental)Maximum FlowMax Flow Problem IntroductionFord-Fulkerson Algorithm for Maximum Flow ProblemFind maximum number of edge disjoint paths between two verticesFind minimum s-t cut in a flow networkMaximum Bipartite MatchingChannel Assignment ProblemIntroduction to Push Relabel AlgorithmKarger’s Algorithm- Set 1- Introduction and ImplementationDinic’s algorithm for Maximum FlowSome must do Problems on Graph:Find length of the largest region in Boolean MatrixCount number of trees in a forestA Peterson Graph ProblemClone an Undirected GraphGraph Coloring (Introduction and Applications)Traveling Salesman Problem (TSP) ImplementationVertex Cover Problem | Set 1 (Introduction and Approximate Algorithm)K Centers Problem | Set 1 (Greedy Approximate Algorithm)Erdos Renyl Model (for generating Random Graphs)Chinese Postman or Route Inspection | Set 1 (introduction)Hierholzer’s Algorithm for directed graphCheck whether a given graph is Bipartite or notSnake and Ladder ProblemBoggle (Find all possible words in a board of characters)Hopcroft Karp Algorithm for Maximum Matching-IntroductionMinimum Time to rot all orangesConstruct a graph from given degrees of all verticesDetermine whether a universal sink exists in a directed graphNumber of sink nodes in a graphTwo Clique Problem (Check if Graph can be divided in two Cliques)Some Quizzes:Quizzes on Graph TraversalQuizzes on Graph Shortest PathQuizzes on Graph Minimum Spanning TreeQuizzes on GraphsQuick Links :Top 10 Interview Questions on Depth First Search (DFS)Some interesting shortest path questionsPractice Problems on GraphsVideos on GraphsRecomended:Learn Data Structure and Algorithms | DSA TutorialPlease write comments if you find anything incorrect, or you want to share more information about the topic discussed above.