
Coding Education
What Is an Algorithm? Definition, Traits, and Examples

Bayu Nugraha
Children's Coding Specialist

An algorithm is a logical, systematic sequence of steps to solve a problem or reach a particular goal. The term doesn't belong only to computers — a cooking recipe, directions, and assembling a cabinet are all algorithms.
The word "algorithm" comes from the name of the 9th-century Persian mathematician Al-Khwarizmi. In programming, an algorithm is the core of every program: before writing code, a programmer designs the algorithm first.
What an Algorithm Is, Simply
Imagine explaining how to make tea to a robot:
- Boil water
- Put tea in a cup
- Pour the hot water
- Add sugar, then stir
This sequence is an algorithm — clear, ordered steps that produce a cup of tea. A computer works exactly the same way: it needs orderly, unambiguous instructions.
Three basic components of an algorithm:
- Input: initial data or conditions (water, tea, sugar)
- Process: the steps performed (boil, pour, stir)
- Output: the final result (a cup of tea)

