# Tag Archives: Dijkstra

Given a directed, weighted graph with n nodes and e edges, the task is to find the maximum product of edge weights in any path… Read More
What is Dijkstra’s Algorithm? Dijkstra’s algorithm is a popular algorithms for solving many single-source shortest path problems having non-negative edge weight in the graphs i.e.,… Read More
Given an integer n and a 2D integer array of edges where edges[i] = [ui, vi, timei] means that there is an edge between intersections… Read More
Given an undirected graph with N nodes (numbered from 0 to N-1) such that any node can be reached from any other node and there… Read More
Given a directed weighted graph represented by a 2-D array graph[][] of size n and 3 integers src, dst, and k representing the source point,… Read More
Given an adjacency matrix graph[][] of a weighted graph consisting of N nodes and positive weights, the task for each connected component of the graph… Read More
Barbara got really good grades in school last year, so her parents decided to gift her with a pet rabbit. She was so excited that… Read More
Dijkstra’s Algorithm: It is a graph searching algorithm that uses a Greedy Approach to find the shortest path from the source node to all other… Read More
Given a directed and weighted graph of N nodes and M edges, the task is to count the number of shortest length paths between node… Read More
Dijkstra’s algorithm is very similar to Prim’s algorithm for minimum spanning trees. Like Prim’s MST, we generate a SPT (shortest path tree) with a given… Read More
Dijkstra’s algorithm is one of the most popular algorithms for solving many single-source shortest path problems having non-negative edge weight in the graphs i.e., it… Read More
Given a graph of N Nodes and E edges in form of {U, V, W} such that there exists an edge between U and V… Read More
Given an undirected weighted graph of N nodes and M edges in the form of a tuple lets say {X, Y, Z} such that there… Read More
Given a directed graph and a source vertex in the graph, the task is to find the shortest distance and path from source to target… Read More
Given a matrix of size N x M consisting of integers 1, 2, 3 and 4. Each value represents the possible movement from that cell:  1… Read More