What is an algorithm really?
You've probably seen and heard the phrase "What is an algorithm?" countless times. Even I have attempted to explain it before. But it has always felt... incomplete to me. I wasn’t just looking for a definition—I was searching for its philosophy. And that’s exactly why it still feels mysterious to me. Questions like: Why the word algorithm? Why is the term so deeply tied to computer science? Why do algorithms have to be step-by-step? Why must an algorithm always have an end? How do we decide if an algorithm is good or bad? How do we find and choose the right algorithm for a real-world problem? And most importantly: Why are all the explanations and articles out there so academic and never truly satisfying? I’ve had these questions for a long time. And here, I’ll try to share everything I’ve learned so far. If I get something wrong, I’d love for you to correct me! What is an algorithm really? It’s actually very simple. Anything that leads us to a solution is an algorithm. Let’s say I want to drink coffee. What’s my process? I have to: Stand up Walk to the coffee Grab a cup Pour the coffee Drink it Done. That’s an algorithm. I followed a set of steps to reach my goal: drinking coffee. But here’s the thing—was this an important problem? Not really. The point is, algorithms exist everywhere, not just in computer science. They are the processes we use to get things done—whether it’s making coffee, solving a math problem, or navigating through a maze of decisions. Algorithm definition in CS But what exactly is the definition of an algorithm in computer science (CS)? In CS, an algorithm is a sequence of instructions that a computer follows to solve a well-defined problem. It basically tells the computer what to do and how to do it. Algorithms can instruct a computer on how to: Perform calculations Process data Make decisions Every program, every function, and every piece of logic in a computer ultimately boils down to an algorithm—a structured, step-by-step approach to solving a problem efficiently. The story of the algorithm Alright, so we’ve covered what an algorithm is in CS. But before diving deeper, let’s take a step back—why the heck is it even called an algorithm? Why not Aglagorikhtam or something equally ridiculous? Well, the story of the word "algorithm" goes back over 1200 years. And believe it or not, it comes from the name of a real person: Muhammad ibn Musa al-Khwarizmi—a Persian mathematician, astronomer, and geographer from the 9th century. He wrote a book about Hindu-Arabic numerals and computational methods, which was later translated into Latin. And during that translation, his name "Al-Khwarizmi" was adapted as "Algoritmi" in Latin. Eventually, over time, the term evolved into "algorithm", and now it’s a fundamental concept in computer science. So, essentially, “algorithm” literally means “a computational method inspired by Al-Khwarizmi”. But why didn’t we end up with a word like "Aglagorikhtam"?

You've probably seen and heard the phrase "What is an algorithm?" countless times. Even I have attempted to explain it before. But it has always felt... incomplete to me. I wasn’t just looking for a definition—I was searching for its philosophy. And that’s exactly why it still feels mysterious to me.
Questions like:
- Why the word algorithm?
- Why is the term so deeply tied to computer science?
- Why do algorithms have to be step-by-step?
- Why must an algorithm always have an end?
- How do we decide if an algorithm is good or bad?
- How do we find and choose the right algorithm for a real-world problem?
And most importantly:
Why are all the explanations and articles out there so academic and never truly satisfying?
I’ve had these questions for a long time. And here, I’ll try to share everything I’ve learned so far.
If I get something wrong, I’d love for you to correct me!
What is an algorithm really?
It’s actually very simple. Anything that leads us to a solution is an algorithm.
Let’s say I want to drink coffee. What’s my process?
I have to:
- Stand up
- Walk to the coffee
- Grab a cup
- Pour the coffee
- Drink it
- Done.
That’s an algorithm. I followed a set of steps to reach my goal: drinking coffee.
But here’s the thing—was this an important problem?
Not really.
The point is, algorithms exist everywhere, not just in computer science. They are the processes we use to get things done—whether it’s making coffee, solving a math problem, or navigating through a maze of decisions.
Algorithm definition in CS
But what exactly is the definition of an algorithm in computer science (CS)?
In CS, an algorithm is a sequence of instructions that a computer follows to solve a well-defined problem. It basically tells the computer what to do and how to do it.
Algorithms can instruct a computer on how to:
- Perform calculations
- Process data
- Make decisions
Every program, every function, and every piece of logic in a computer ultimately boils down to an algorithm—a structured, step-by-step approach to solving a problem efficiently.
The story of the algorithm
Alright, so we’ve covered what an algorithm is in CS. But before diving deeper, let’s take a step back—why the heck is it even called an algorithm? Why not Aglagorikhtam or something equally ridiculous?
Well, the story of the word "algorithm" goes back over 1200 years. And believe it or not, it comes from the name of a real person: Muhammad ibn Musa al-Khwarizmi—a Persian mathematician, astronomer, and geographer from the 9th century.
He wrote a book about Hindu-Arabic numerals and computational methods, which was later translated into Latin. And during that translation, his name "Al-Khwarizmi" was adapted as "Algoritmi" in Latin. Eventually, over time, the term evolved into "algorithm", and now it’s a fundamental concept in computer science.
So, essentially, “algorithm” literally means “a computational method inspired by Al-Khwarizmi”.