Skip to content

Tag Archives: Shortest Path

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
Data transfer operations is a crucial aspect in case of networking and routing. So efficient data transfer operations is a must need, with minimum hardware… Read More
Given two four digit prime numbers, suppose 1033 and 8179, we need to find the shortest path from 1033 to 8179 by altering only single… Read More
Main Purposes: Dijkstra’s Algorithm is one example of a single-source shortest or SSSP algorithm, i.e., given a source vertex it finds shortest path from source… Read More
Given a matrix of N*M order. Find the shortest distance from a source cell to a destination cell, traversing through limited cells only. Also you… Read More
Given a directed and strongly connected graph with non-negative edge weights. We define the mean weight of a cycle as the summation of all the… Read More
Given a positive weighted undirected graph, find the minimum weight cycle in it. Examples:  Attention reader! Don’t stop learning now. Get hold of all the important… Read More
Given a N X N matrix (M) filled with 1 , 0 , 2 , 3 . Find the minimum numbers of moves needed to… Read More
Given a two dimensional grid, each cell of which contains integer cost which represents a cost to traverse through that cell, we need to find… Read More
Given a Weighted Directed Acyclic Graph (DAG) and a source vertex in it, find the longest distances from source vertex to all other vertices in… Read More
Given a matrix that is filled with ‘O’, ‘G’, and ‘W’ where ‘O’ represents open space, ‘G’ represents guards and ‘W’ represents walls in a… Read More
Given a path in the form of a rectangular matrix having few landmines arbitrarily placed (marked as 0), calculate length of the shortest safe route… Read More
Given a screen containing alphabets from A-Z, we can go from one character to another characters using a remote. The remote contains left, right, top… Read More
Given a MxN matrix where each element can either be 0 or 1. We need to find the shortest path between a given source cell… Read More

Start Your Coding Journey Now!