LIM26 is Live — Learning Intelligence Meet 2026 by Ocoviz · Discover the Movement
Computational thinking basics

What is an algorithm? Meaning, examples and steps

An algorithm is a clear list of steps that solves a problem. Here is what that means, what makes a good one and how to write one, with simple examples.

The meaning

Algorithm definition

An algorithm is a finite list of clear, ordered steps that takes some input, does something with it and gives an output. Think of a recipe: ingredients go in, steps are followed, and a dish comes out. Anyone who follows the steps exactly gets the same result.

What makes a good algorithm

Five characteristics

📥

Input

It starts with the information it needs, such as numbers to add or a list to search.

📤

Output

It produces a result, such as a total, a yes or no, or a sorted list.

🎯

Definite steps

Each step is exact. "Add them up" works; "do something sensible" does not.

⏱️

Finite

It must end after a limited number of steps.

✅

Effective

Every step is simple enough to actually be carried out.

A first example

Algorithm to add two numbers

Here is the same idea in plain steps and in pseudocode.

Plain steps: 1. Start. 2. Take the first number. 3. Take the second number. 4. Add them. 5. Show the sum. 6. Stop.

START
READ a, b
sum = a + b
PRINT sum
STOP
Ways to write one

Steps, flowcharts and pseudocode

Plain numbered steps are best for beginners. A flowchart draws the steps as boxes and arrows, with diamond boxes for yes or no decisions. Pseudocode looks like code but is written in everyday words, so it can be turned into any programming language later.

Algorithm meaning in a sentence

Using the word correctly

💬

In school

"The teacher asked us to write an algorithm for making a sandwich."

📱

In daily life

"The app uses an algorithm to suggest videos you might like."

💻

In computing

"This algorithm sorts a list of 1,000 names in a fraction of a second."

Algorithm vs program

Same idea, different form

An algorithm describes what to do and in what order. A program writes those steps in a language such as Python so a computer can run them. A good habit is to write the algorithm first, test it on paper, and only then turn it into a program.

Frequently Asked Questions (FAQs)

What is an algorithm: answered

What is an algorithm in simple words?
An algorithm is a list of clear steps for doing a task or solving a problem, in an order anyone can follow to get the same result.
What is an algorithm in computer science?
It is a finite set of well-defined instructions that takes some input, does a calculation or decision process and produces an output. A program is one way of writing an algorithm in a programming language.
What are the characteristics of an algorithm?
It has clear inputs and outputs, every step is precise, it ends after a finite number of steps, and every step can actually be carried out.
What is the difference between an algorithm and a program?
An algorithm is the idea: the steps. A program is those steps written in a language a computer can run. The same algorithm can be written in many languages.
How can an algorithm be written?
In plain numbered steps, as a flowchart with boxes and arrows, or as pseudocode, which is step-by-step text that looks like code but is not tied to a language.
Where does the word algorithm come from?
It comes from the name of the ninth-century Persian mathematician al-Khwarizmi, whose works on arithmetic spread step-by-step methods of calculation.
Does an algorithm need a computer?
No. A recipe, a set of directions or the steps for long division are all algorithms. Computers are good at running them quickly.

Build thinking skills, not just answers

Ocoviz's AI Tutor coaches students step by step instead of giving the answer.

See the AI Tutor