# Category Archives: Graph

We strongly recommend to refer below post as a prerequisite.Hopcroft–Karp Algorithm for Maximum Matching | Set 1 (Introduction) There are few important things to note… Read More
A matching in a Bipartite Graph is a set of the edges chosen in such a way that no two edges share an endpoint. A… Read More
import java.util.Scanner; //Scanner Function to take in the Input Values    public class Dijkstra {     static Scanner scan; // scan is a Scanner Object   … Read More
Intuit came to our college campus for placements. Shortlisted 13 students after written and then selected 4 students for Full Time Job. There were 3… Read More
Recently makemytrip visited our Campus and I got selected in recruitment drive.The placement drive consisted of 4 rounds. Round1: MCQ and coding round It was… Read More
Given a dictionary, and two words ‘start’ and ‘target’ (both of same length). Find length of the smallest chain from ‘start’ to ‘target’ if it… Read More
Given a list of contacts containing the username, email and phone number in any order. Identify the same contacts (i.e., the same person having many… Read More
Given a matrix of dimension M * N where each cell in the matrix can have values 0, 1 or 2 which has the following… Read More
Round 1 (Written) Around 140 students appeared for the offline test.  There were 20 MCQs that to be done in (30 minutes), questions were from OS,DBMS,Datastructures. After… Read More
We have introduced and discussed below Karger’s algorithm in set 1. 1) Initialize contracted graph CG as copy of original graph 2) While there are… Read More
Given a number line from -infinity to +infinity. You start at 0 and can go either to the left or to the right. The condition… Read More
What is Steiner Tree?  The Steiner Tree Problem is known to be NP-hard, which means that it is unlikely that there is an efficient algorithm… Read More
Given an undirected graph, the task is to print all the connected components line by line.  Examples: Input: Consider the following graph Example of an… Read More
Given an undirected and unweighted graph, find the smallest cut (smallest number of edges that disconnects the graph into two components). The input graph may have… Read More
We have discussed the following topics on Minimum Spanning Tree.Applications of Minimum Spanning Tree Problem Kruskal’s Minimum Spanning Tree Algorithm Prim’s Minimum Spanning Tree AlgorithmIn this post,… Read More