Dijkstra
← Back to Shortest Path
A greedy algorithm that finds the shortest path from a source vertex to all other vertices in a graph with non-negative edge weights. Uses a priority queue for efficiency. O((V + E) log V) with a binary heap.
← Back to Shortest Path
A greedy algorithm that finds the shortest path from a source vertex to all other vertices in a graph with non-negative edge weights. Uses a priority queue for efficiency. O((V + E) log V) with a binary heap.