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
Category Archives: Graph
Given a graph with both directed and undirected edges. It is given that the directed edges don’t form cycle. How to assign directions to undirected… Read More
Given n cities and distances between every pair of cities, select k cities to place warehouses (or ATMs or Cloud Server) such that the maximum… Read More
There are N stations on route of a train. The train goes from station 0 to N-1. The ticket cost for all pair of stations… Read More
We have earlier discussed Breadth First Traversal Algorithm for Graphs. Here in this article, we will see the applications, advantages, and disadvantages of the Breadth… Read More
A person is determined to finish the book in ‘k’ days but he never wants to stop a chapter in between. Find the optimal assignment… Read More
Given a directed graph, a source vertex ‘s’ and a destination vertex ‘d’, print all paths from given ‘s’ to ‘d’. Consider the following directed graph.… Read More
Given a number of friends who have to give or take some amount of money from one another. Design an algorithm by which the total… Read More
Given a dictionary, a method to do lookup in dictionary and a M x N board where every cell has one character. Find all possible… Read More
Given a matrix where every element is either ‘O’ or ‘X’, replace ‘O’ with ‘X’ if surrounded by ‘X’. A ‘O’ (or a set of… Read More
A biconnected component is a maximal biconnected subgraph. Biconnected Graph is already discussed here. In this article, we will see how to find biconnected component… Read More
In MS-Paint, when we take the brush to a pixel and click, the color of the region of that pixel is replaced with a new… Read More
A vertex cover of an undirected graph is a subset of its vertices such that for every edge (u, v) of the graph, either ‘u’… Read More
MakeMyTrip recently visited our campus. Below is my interview experience: Round 1: (Online MCQs) Section A- There were 20 Aptitude and Logical Reasoning questions which has… Read More
Write a function that returns true if a given undirected graph is a tree and false otherwise. For example, the following graph is a tree. … Read More