# Category Archives: Graph

Given a directed graph, find out whether the graph is strongly connected or not. A directed graph is strongly connected if there is a path… Read More
An undirected graph is called Biconnected if there are two vertex-disjoint paths between any two vertices. In a Biconnected Graph, there is a simple cycle… Read More
An edge in an undirected connected graph is a bridge iff removing it disconnects the graph. For a disconnected undirected graph, definition is similar, a… Read More
A vertex in an undirected connected graph is an articulation point (or cut vertex) if removing it (and edges through it) disconnects the graph. Articulation… Read More
A directed graph is strongly connected if there is a path between all pairs of vertices. A strongly connected component (SCC) of a directed graph… Read More
Given a Weighted Directed Acyclic Graph and a source vertex in the graph, find the shortest paths from given source to all other vertices.  Recommended:… Read More
Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge u v, vertex u comes… Read More
A Bipartite Graph is a graph whose vertices can be divided into two independent sets, U and V such that every edge (u, v) either… Read More
Given a directed graph, find out if a vertex j is reachable from another vertex i for all vertex pairs (i, j) in the given… Read More
Given a graph and a source vertex src in graph, find shortest paths from src to all vertices in the given graph. The graph may… Read More
We recommend reading the following two posts as a prerequisite of this post.1. Greedy Algorithms | Set 7 (Dijkstra’s shortest path algorithm) 2. Graph and its representationsWe… Read More
Given a graph and a source vertex in the graph, find the shortest paths from the source to all vertices in the given graph.Dijkstra’s… Read More
We recommend to read following two posts as a prerequisite of this post.1. Greedy Algorithms | Set 5 (Prim’s Minimum Spanning Tree (MST)) 2. Graph and… Read More
We have discussed Kruskal’s algorithm for Minimum Spanning Tree. Like Kruskal’s algorithm, Prim’s algorithm is also a Greedy algorithm. It starts with an empty spanning tree.… Read More
A graph is a data structure that consists of the following two components: 1. A finite set of vertices also called as nodes. 2. A finite set… Read More