Programming words

What is an algorithm?

An algorithm is the order of a job. It says what happens first and what happens next. The language can change, and the order can stay the same.

  • It is a clear step. "Look a bit" is not an algorithm.
  • The same input should give the same result.
  • Code is an algorithm written in one language.

Making tea is an algorithm too: boil the water, put the cup, brew, pour. Code writes that in one language. If the step is muddy, the code comes out muddy.

Related guides

About this tool

An algorithm is a clear, step‑by‑step logical plan that solves a specific problem. Each step must be unambiguous and repeatable so that the same input always yields the same output. Algorithms are fundamental in programming, mathematics, and everyday problem solving.

People need algorithms when they want to sort data, search information, calculate financial metrics, or train machine‑learning models. Writing and optimizing algorithms provides a structured approach to achieve efficient, reliable solutions.

How to use it

  1. Define the problem and specify input and output requirements.
  2. Break the problem into small, manageable steps.
  3. Write each step logically and in sequence, using concise notation where possible.
  4. Test the algorithm and refine it as needed.

Common uses

Frequently asked questions

What is an algorithm?

An algorithm is a clear, step‑by‑step logical plan that solves a specific problem.

Why are algorithms important?

They structure code, improve performance, and ensure consistent results.

What principles should guide algorithm design?

Steps must be clear, repeatable, and ordered; inputs and outputs must be precisely defined.