---
title: 'How Dijkstra''s Algorithm Was Born in 20 Minutes'
source: 'https://youtube.com/watch?v=_kNabHEZQlo'
video_id: '_kNabHEZQlo'
date: 2026-08-12
duration_sec: 175
---

# How Dijkstra's Algorithm Was Born in 20 Minutes

> Source: [How Dijkstra's Algorithm Was Born in 20 Minutes](https://youtube.com/watch?v=_kNabHEZQlo)

## Summary

This video tells the origin story of Dijkstra's algorithm, one of the most important algorithms in computer science. It recounts how Edsger W. Dijkstra conceived the shortest-path algorithm in just 20 minutes while sitting at a café in Amsterdam in 1956, and how this discovery went on to power GPS, network routing, and countless other technologies. The narrative emphasizes the power of inspiration and the profound impact of a single moment of insight.

### Key Points

- **The 1956 Setting** [00:00] — A young programmer in Amsterdam is shopping with his girlfriend, unaware he is about to develop a foundational algorithm that would transform the world.
- **Dijkstra's Identity and Impact** [00:28] — Edsger W. Dijkstra, a Dutch programmer and mathematician, created an algorithm that now powers GPS navigation, network routing, social media, supply chains, and robotics.
- **The Motivation** [00:43] — Working at the Mathematical Center in Amsterdam, Dijkstra wanted to showcase the power of the new Armac computer by solving a challenging but understandable problem.
- **The Eureka Moment** [01:22] — While resting at a café terrace with his girlfriend, Dijkstra continued thinking about finding the shortest path between two locations, realizing he could generalize the problem to any two cities.
- **Design in His Head** [02:03] — Contrary to popular belief, Dijkstra did not use pencil and paper; he designed the entire algorithm in his head during those 20 minutes.
- **The Lasting Legacy** [02:32] — The story illustrates how inspiration can strike unexpectedly and how a brilliant discovery can have a profound impact on the future of humanity.

### Conclusion

Dijkstra's 20-minute insight at a café became a cornerstone of computer science, demonstrating that world-changing ideas can emerge from the most ordinary moments. The algorithm's enduring influence across modern technology underscores the value of deep, focused thinking.

## Transcript

It's 1956. A young programmer is taking his girlfriend shopping in Amsterdam without knowing that he would develop one of the most important algorithms in history. No one could
possibly know that in just 20 minutes the world as we knew it would be transformed. That was the day when a soon-to-be a world-renowned Dutch programmer and mathematician
Edgar W. Dijkstra came up with an algorithm that would power GPS navigation, network routing, social media networks, supply chains, robotics, and more. He literally changed the world in the
time it takes us to drink a cup of coffee. Can you imagine that? Dijkstra was working as a programmer at the Mathematical Center in Amsterdam. The center was about to unveil
a pioneering Dutch computer, the new Armac computer. He wanted to showcase the power of this computer by choosing a problem that would be challenging enough to surprise people,
but general enough so that people who were not specialized in computing could still understand it. He chose the problem of finding the shortest path between two locations. He kept thinking about
this during and after his work hours When Dykstra and his girlfriend felt tired from walking around the shops that day they sat down at a cafe terrace to drink a cup of coffee
He kept thinking, he just kept thinking. How could he find the shortest way to travel from Rotterdam to Groningen? But then he realized the potential of making the question more general.
Why not come up with a general solution that would find the shortest path between any two given cities? You might picture Dijkstra very focused on his cafe table,
sketching and brainstorming in hundreds of pieces of paper to come up with the right solution. Interestingly, that's not how it happened. Dijkstra literally said that he didn't use pencil and paper.
He designed it entirely in his head. At that time, Dijkstra didn't know that those 20 minutes would become the cornerstone of his fame, reshaping the world by unlocking capabilities that we didn't even know existed.
This story proves how inspiration can come from the most unexpected moments, and how brilliant discoveries can have a profound impact in the future of humankind. Dijkstra literally changed the world with his 20-minute masterpiece.
To learn more about Dijkstra's algorithm, check out my full video essay on the Free Code Camp YouTube channel.
