## Maximum number of edges among all connected components of an undirected graph

Given integers ‘N’ and ‘K’ where, N is the number of vertices of an undirected graph and ‘K’ denotes the number of edges in the… Read More »

- Find the number of islands | Set 1 (Using DFS)
- Strongly Connected Components
- Connected Components in an undirected graph
- Find a Mother Vertex in a Graph
- Find k-cores of an undirected graph
- Articulation Points (or Cut Vertices) in a Graph
- Check if a graph is strongly connected | Set 1 (Kosaraju using DFS)
- Bridges in a graph
- Find the number of Islands | Set 2 (Using Disjoint Set)
- Tarjan's Algorithm to find Strongly Connected Components
- Cycles of length n in an undirected and connected graph
- Detect cycle in an undirected graph using BFS
- Euler Circuit in a Directed Graph
- Biconnected Components
- Find all reachable nodes from every node present in a given set
- Biconnected graph
- Assign directions to edges so that the directed graph remains acyclic
- Number of groups formed in a graph of friends
- Check if removing a given edge disconnects a graph
- Maximum edges that can be added to DAG so that is remains DAG
- Check if there is a cycle with odd weight sum in an undirected graph
- Karger's algorithm for Minimum Cut | Set 1 (Introduction and Implementation)
- Check if a given directed graph is strongly connected | Set 2 (Kosaraju using BFS)
- Number of shortest paths in an unweighted and directed graph
- Eulerian Path in undirected graph
- Count the number of non-reachable nodes
- Maximum number of edges among all connected components of an undirected graph
- Number of single cycle components in an undirected graph
- Count single node isolated sub-graphs in a disconnected graph
- Number of Walks from source to destination

Given integers ‘N’ and ‘K’ where, N is the number of vertices of an undirected graph and ‘K’ denotes the number of edges in the… Read More »

Given a graph and two vertices src and dest, count the total number of paths from src to dest where the length of the path… Read More »

Given a directed graph represented as an adjacency matrix and an integer ‘k’, the task is to find all the vertex pairs that are connected… Read More »

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 a set of ‘n’ vertices and ‘m’ edges of an undirected simple graph (no parallel edges and no self-loop), find the number of single-cycle-components… 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… 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… 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 »

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 »