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 »
Given an undirected graph and an edge, the task is to find if the given edge is a bridge in graph, i.e., removing the edge… Read More »
A DAG is given to us, we need to find maximum number of edges that can be added to this DAG, after which new graph… Read More »
Given an undirected graph and a set of vertices, find all reachable nodes from every vertex present in the given set. Consider below undirected graph… Read More »
Given a boolean 2D matrix, find the number of islands. A group of connected 1s forms an island. For example, the below matrix contains 5… Read More »
What is a Mother Vertex? A mother vertex in a graph G = (V,E) is a vertex v such that all other vertices in G… Read More »
Given a graph G and an integer K, K-cores of the graph are connected components that are left after all vertices of degree less than… Read More »
Given an undirected graph, print all connected components line by line. For example consider the following graph.
Given an undirected and unweighted graph, find the smallest cut (smallest number of edges that disconnects the graph into two components).
Given a graph with both directed and undirected edges. It is given that the directed edges don’t form cycle. How to assign directions to undirected… Read More »
A biconnected component is a maximal biconnected subgraph.
A directed graph is strongly connected if there is a path between all pairs of vertices.
Eulerian Path is a path in graph that visits every edge exactly once. Eulerian Circuit is an Eulerian Path which starts and ends on the… Read More »
Given a directed graph, find out whether the graph is strongly connected or not. A directed graph is strongly connected if
An undirected graph is called Biconnected if there are two vertex-disjoint paths between any two vertices.