## Minimum cost path in a Matrix by moving only on value difference of X

Given a matrix mat[][] and an integer X, the task is to find the minimum number of operations required to reach from . In each… Read More »

Given a matrix mat[][] and an integer X, the task is to find the minimum number of operations required to reach from . In each… Read More »

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

Given an unweighted directed graph and Q queries consisting of sequences of traversal between two nodes of the graph, the task is to find out… Read More »

Given two number N and M. The task is to find the number of shortest paths to reach the cell(i, j) in the grid of… Read More »

We have introduced Bellman Ford and discussed on implementation here. Input: Graph and a source vertex src Output: Shortest distance to all vertices from src.… Read More »

Given a Weighted Directed Graph and a destination vertex in the graph, find the shortest distance from all vertex to the destination vertex. Input :… Read More »

Uniform-Cost Search is a variant of Dijikstra’s algorithm. Here, instead of inserting all vertices into a priority queue, we insert only source, then one by… Read More »

Given an adjacency list representation of a directed graph, the task is to find the path from source to every other node in the graph… Read More »

Given coordinates of 3 cells (X1, Y1), (X2, Y2) and (X3, Y3) of a matrix. The task is to find the minimum path which connects… Read More »

Given a graph with adjacency list representation of the edges between the nodes, the task is to implement Dijkstra’s Algorithm for single source shortest path… Read More »

Prerequisite: Dijkstra’s shortest path algorithm Given an adjacency matrix graph representing paths between the nodes in the given graph. The task is to find the… Read More »

Suppose there are n towns connected by m bidirectional roads. There are s towns among them with a police station. We want to find out… Read More »

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 »