0% found this document useful (0 votes)
11 views1 page

Dijkstras Algorithm - Shortest Paths With Dijkstras Algorithm

Dijkstra's Algorithm is used to calculate the shortest path from a selected node to all other nodes in a graph. The algorithm marks each node with its minimum distance from the chosen node, starting with an initial distance of zero for the selected node and infinity for others. An example is provided to illustrate the execution of the algorithm.

Uploaded by

Fazal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Dijkstras Algorithm - Shortest Paths With Dijkstras Algorithm

Dijkstra's Algorithm is used to calculate the shortest path from a selected node to all other nodes in a graph. The algorithm marks each node with its minimum distance from the chosen node, starting with an initial distance of zero for the selected node and infinity for others. An example is provided to illustrate the execution of the algorithm.

Uploaded by

Fazal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

10/29/2020 Dijkstra's Algorithm - Shortest paths with Dijkstra's Algorithm

Employers: discover CodinGame for tech hiring

PRACTICE COMPETE 1 CONTRIBUTE LEARN 1 LOG IN SIGN UP

Shortest paths with Dijkstra's Algorithm Racso 235.6K views

Previous: Introduction 2/4 Dijkstra's Algorithm Next: Keeping track of …

Dijkstra's Algorithm
117
Dijkstra's Algorithm allows you to calculate the shortest path between one node (you pick which one) and every
other node in the graph. You'll nd a description of the algorithm at the end of this page, but, let's study the

6
algorithm with an explained example! Let's calculate the shortest path between node C and the other nodes in
our graph:

During the algorithm execution, we'll mark every node with its minimum distance to node C (our selected node).
For node C, this distance is 0. For the rest of nodes, as we still don't know that minimum distance, it starts
being in nity (∞):

We use cookies to analyze our site tra c and improve the quality of our services.
You can edit your cookie options at any time. Find out more.

ACCEPT

https://www.codingame.com/playgrounds/1608/shortest-paths-with-dijkstras-algorithm/dijkstras-algorithm 1/1

You might also like