## Sum of the minimum elements in all connected components of an undirected graph

Given an array A of N numbers where Ai represent the value of the (i+1)th node. Also given are M pair of edges where u… Read More »

Given an array A of N numbers where Ai represent the value of the (i+1)th node. Also given are M pair of edges where u… Read More »

The backbone analysis of any network is broadly accomplished by using Graph Theory and its Algorithms. The performance constraints are Reliability, Delay/Throughput and the goal… Read More »

Given a grid with different colors in a different cell, each color represented by a different number. The task is to find out the largest… Read More »

Suppose there are n towns connected by m bidirectional roads. There are s towns among them with a police station. We want to find out… Read More »

Prerequisite : NP-Completeness The class of languages for which membership can be decided quickly fall in the class of P and The class of languages… Read More »

Permutation A permutation is an arrangement of elements. A permutation of n elements can be represented by an arrangement of the numbers 1, 2, …n… 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 a graph with N nodes numbered from 1 to N and M edges and an array of numbers from 1 to N. Check if… Read More »

A Multistage graph is a directed graph in which the nodes can be divided into a set of stages such that all edges are from… Read More »

Transpose of a directed graph G is another directed graph on the same set of vertices with all of the edges reversed compared to the… Read More »

Given a unweighted graph, a source and a destination, we need to find shortest path from source to destination in the graph in most optimal… Read More »

Given an undirected graph, task is to find the minimum number of weakly connected nodes after converting this graph into directed one. Weakly Connected Nodes… Read More »

Given an undirected colored graph(edges are colored), with a source vertex ‘s’ and a destination vertex ‘d’, print number of paths which from given ‘s’… Read More »

Given two positive integer n, k. Consider an undirected complete connected graph of n nodes in a complete connected graph. The task is to calculate… Read More »