Coding Education

6 min read

What Is an Algorithm? Definition, Traits, and Examples

Published: 21.06.2026·Updated: 21.06.2026
Bayu Nugraha

Bayu Nugraha

Children's Coding Specialist

What Is an Algorithm? Definition, Traits, and Examples

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:

  1. Boil water
  2. Put tea in a cup
  3. Pour the hot water
  4. 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)