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. We have also discussed Applications of Depth First Traversal.
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’.
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 »
A biconnected component is a maximal biconnected subgraph.
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 »
Write a function that returns true if a given undirected graph is tree and false otherwise. For example, the following graph is a tree.
Given a snake and ladder board, find the minimum number of dice throws required to reach the destination or last cell from source or 1st… Read More »
A directed graph is strongly connected if there is a path between all pairs of vertices.
Given a directed and two vertices ‘u’ and ‘v’ in it, find shortest path from ‘u’ to ‘v’ with exactly k edges on the path.
Given a directed graph and two vertices ‘u’ and ‘v’ in it, count all possible walks from ‘u’ to ‘v’ with exactly k edges on… Read More »