Create an animated lesson
On requestThis article is free to read. Creating a lesson uses your daily or stored credits; review the language and settings before starting.
What is an algorithm?
TechnologyLesson on requestFree to read
Quick answer
An algorithm is a clear, step-by-step set of instructions for solving a problem or completing a task. A recipe is an algorithm for cooking; computers run algorithms to sort lists, find routes, recommend videos, and almost everything else they do.
Key things to understand
- A precise step-by-step recipe to solve a problem.
- It takes an input and produces an output.
- The same algorithm works on any matching input.
- Better algorithms solve problems faster or with less memory.
People also ask
What is an algorithm in simple terms?
A set of clear, ordered steps that turns an input into a desired result — like a recipe a computer can follow exactly.
Where are algorithms used?
Everywhere computing happens — search engines, maps, social feeds, payments, and AI all run on algorithms.
What makes a good algorithm?
It's correct and efficient — using as little time and memory as possible to get the right answer.
Is an algorithm the same as code?
No. An algorithm is the idea or recipe; code is one way to express it in a particular programming language.
What makes an algorithm good?
Correctness (it always gives the right result) and efficiency (it uses little time and memory).
What is Big O notation?
A way to describe how an algorithm's time or memory grows as the input gets larger.

