Top "Dijkstra" questions

Dijkstra's algorithm, conceived by Dutch computer scientist Edsger Dijkstra is a graph search algorithm that solves the single-source shortest path problem for a connected graph with nonnegative edge path costs, producing a shortest path tree.

graph - Dijkstra for The Single-Source Longest Path

Ok, I posted this question because of this exercise: Can we modify Dijkstra’s algorithm to solve the single-source longest …

algorithm data-structures graph dijkstra
Bus public transport algorithm

I am working on an offline C# application that can find bus routes. I can extract the timetable/bus/route …

c# java public dijkstra gtfs
Why does Dijkstra's Algorithm use a heap (priority queue)?

I have tried using Djikstra's Algorithm on a cyclic weighted graph without using a priority queue (heap) and it worked. …

graph-algorithm priority-queue dijkstra
How to modify dijkstra algorithm to find all possible paths?

I know that could be asked before already but I cannot find it. I need to modify below dijkstra algorithm …

c# algorithm graph-algorithm breadth-first-search dijkstra
Why use Dijkstra's algorithm instead of Best (Cheapest) First Search?

From what I have read so far. The Best First Search seems faster in terms of finding the shortest path …

algorithm search graph dijkstra
The Big O on the Dijkstra Fibonacci-heap solution

From Wikipedia: O(|E| + |V| log|V|) From Big O Cheat List: O((|V| + |E|) log |V|) I consider there …

algorithm big-o dijkstra
how to save shortest path in dijkstra algorithm

So first let's define Dijkstra algorithm: Dijkstra's algorithm finds single-source shortest paths in a directed graph with non-negative edge weights. …

algorithm graph dijkstra shortest-path
Which datatype to use as queue in Dijkstra's algorithm?

I'm trying to implement Dijkstra's algorithm in Java (self-study). I use the pseudo-code provided by Wikipedia (link). Now near the …

java algorithm dijkstra
Dijkstra's algorithm a greedy or dynamic programming algorithm?

In this post it is described Dijkstras as a greedy algorithm, while here and here it is shown to have …

algorithm dynamic-programming dijkstra greedy
Dijkstra's Algorithm using Adjacency Matrix Issue

'm trying to retrieve the shortest path between first and last node. The problem is my code always returns 0. I …

java algorithm matrix dijkstra adjacency-matrix