Shortest Path Algorithms: How to Use Data to Navigate and Optimize | by Ben Chamblee | Jul, 2024

Editor
2 Min Read


An Overview of Dijkstra’s Algorithm and Bellman-Ford Algorithm

Image by Unsplash+ on Unsplash

Have you ever thought about how your GPS always seems to find the fastest route to your destination? No matter how many ways there are to get from Point-A to Point-B, your GPS sorts through them all and gives you just one route — how does it know which route is the best one? In the background, tons of calculations are being made using algorithms like Dijkstra’s to find the shortest path between where you are and where you’re trying to go. There are many different algorithms that can achieve this though, and I’d like to introduce you to a couple of them! In this article, I’ll take a look at a popular shortest path algorithm along with a more advanced one and show how you can use them for your data projects or just for fun!

Dijkstra’s Algorithm

I could write a little summary of how Dijkstra’s works, but I would highly recommend watching this YouTube video by Spanning Tree first.

If you don’t want to watch it, here’s the gist:

You’ve got a collection of points and want to figure out the shortest path between any two of them. For example if you want to go from Point S to Point P the shortest and only path is 2 minutes. However if…

Share this Article
Please enter CoinGecko Free Api Key to get this plugin works.