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.

Why use Dijkstra's Algorithm if Breadth First Search (BFS) can do the same thing faster?

Both can be used to find the shortest path from single source. BFS runs in O(E+V), while Dijkstra's …

algorithm graph dijkstra breadth-first-search
Find cycle of shortest length in a directed graph with positive weights

I was asked this question in an interview, but I couldn't come up with any decent solution. So, I told …

algorithm graph dijkstra
Is Dijkstra's algorithm for directed or undirected graphs?

I keep trying to google this, but the results I'm finding are just adding to my confusion. It seems that …

algorithm graph dijkstra
Use Dijkstra's to find a Minimum Spanning Tree?

Dijkstra's is typically used to find the shortest distance between two nodes in a graph. Can it be used to …

algorithm language-agnostic graph-theory dijkstra minimum-spanning-tree
Dijkstra vs. Floyd-Warshall: Finding optimal route on all node pairs

I am reading up on Dijkstra's algorithm and the Floyd-Warshall algorithm. I understand that Dijkstra's finds the optimal route from …

algorithm graph shortest-path dijkstra floyd-warshall
Dijkstra's algorithm to find all the shortest paths possible

I'm working on Dijkstra's algorithm, and I really need to find all the possible shortest paths, not just one. I'm …

graph dijkstra
How do you solve the 15-puzzle with A-Star or Dijkstra's Algorithm?

I've read in one of my AI books that popular algorithms (A-Star, Dijkstra) for path-finding in simulation or games is …

artificial-intelligence graph-theory dijkstra a-star
How can I use binary heap in the Dijkstra algorithm?

I am writing code of dijkstra algorithm, for the part where we are supposed to find the node with minimum …

heap dijkstra
Finding the shortest route using Dijkstra algorithm

I need to find the shortest route between 2 vertices of a graph. I have a matrix, which contains all the …

c# dijkstra
QuickGraph Dijkstra example

I have an AdjacencyGraph<string, Edge<string>> which I would like to run AlgorithmExtensions.ShortestPathsDijkstra on, …

c# algorithm shortest-path dijkstra quickgraph