## Find the minimum cost to reach destination using a train

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 »

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 »

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 »

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.… Read More »

Question 1: Given a directed weighted graph. You are also given the shortest path from a source vertex ‘s’ to a destination vertex ‘t’. If… Read More »

The problem is to find shortest paths between every pair of vertices in a given weighted directed Graph and weights may be negative. We have… Read More »

Given a Weighted Directed Acyclic Graph (DAG) and a source vertex s in it, find the longest distances from s to all other vertices in… Read More »

Given a Weighted Directed Acyclic Graph and a source vertex in the graph, find the shortest paths from given source to all other vertices. Recommended:… Read More »

Given a graph and a source vertex src in graph, find shortest paths from src to all vertices in the given graph. The graph may… Read More »

We recommend reading the following two posts as a prerequisite of this post. 1. Greedy Algorithms | Set 7 (Dijkstra’s shortest path algorithm) 2. Graph and… Read More »

Given a graph and a source vertex in the graph, find shortest paths from source to all vertices in the given graph. Dijkstra’s algorithm is… Read More »

The Floyd Warshall Algorithm is for solving the All Pairs Shortest Path problem. The problem is to find shortest distances between every pair of vertices… Read More »