Dijkstra's Algorithm
noun
say it: “DIKE-struhz AL-guh-rith-um” /ˈdaɪkstrəz ˈælɡəˌrɪðəm/
A way of finding the fastest or shortest routes from one point in a weighted graph, by always settling the closest place next.
What is Dijkstra's algorithm?
Dijkstra's algorithm finds the shortest paths from a starting vertex in a weighted graph. It repeatedly settles the closest vertex not yet settled, using a priority queue, then updates its neighbors' best times. It's how a GPS finds the fastest route. Every weight must be zero or more.
In a sentence
- “The delivery app uses Dijkstra's algorithm to find the quickest drive, because every street takes a different number of minutes.”
Level: Freelancer · More Data Structures terms at this level
Updated