Skip to content

Tag Archives: graph-connectivity

Given a graph with n nodes and m edges. Find the maximum possible number of nodes which are not part of any edge (m will… Read More
Given an undirected graph, how to check if there is a cycle in the graph? For example, the following graph has a cycle 1-0-2-1.  Recommended:… Read More
Given an unweighted directed graph, can be cyclic or acyclic. Print the number of shortest paths from a given vertex to each of the vertices.… Read More
Given an adjacency matrix representation of an undirected graph. Find if there is any Eulerian Path in the graph. If there is no path print… Read More
Given an undirected graph and a set of vertices, we have to count the number of non-reachable nodes from the given head node using a… Read More
Given a array arr[] of n integers. For every value arr[i], we can move to arr[i] + 1 clockwise considering array elements in cycle. We need… Read More
Given n friends and their friendship relations, find the total number of groups that exist. And the number of ways of new groups that can… Read More
Given an undirected and connected graph and a number n, count total number of cycles of length n in the graph. A cycle of length… Read More
A disconnected Graph with N vertices and K edges is given. The task is to find the count of singleton sub-graphs. A singleton graph is… Read More
Isomorphism : Consider the following two graphs – Are the graphs and the same? If your answer is no, then you need to rethink it.… Read More
Given a weighted and undirected graph, we need to find if a cycle exist in this graph such that the sum of weights of all… Read More
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