Skip to content

Category Archives: Graph

Online Round: This round was held on Hackerrank for 1:30 hrs. There were two questions in this round. A tree was given with upto 10^5 nodes.… Read More
Given a connected graph, check if the graph is bipartite or not. A bipartite graph is possible if the graph coloring is possible using two… 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 n nodes of a tree and their connections, print Subtree nodes of every node.Subtree of a node is defined as a tree which is… Read More
Given a directed graph having n nodes. For each node, delete all the outgoing edges except the outgoing edge with minimum weight. Apply this deletion… 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
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 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

Start Your Coding Journey Now!