Algorithm

Names and abbreviations on this page

MDN — MDN Web Docs (formerly Mozilla Developer Network). Reference material for web programming.

Programming terms & practical skills

What it means

An algorithm is a clear sequence of steps for solving a problem. It describes the method, while a program expresses that method in a language a computer can execute. The steps must specify what happens for the inputs the method is intended to handle.

Related skills

Break down tasksTurn a broad goal into ordered actions.

Define inputsState what information the method needs.

Check outcomesWalk through an ordinary example and compare it with the intended result.

An everyday example

To compare rental costs, list rent, required fees and estimated utilities; add them; then compare totals. Define the period first so that an annual charge is not treated as a monthly charge.

What to check

A precise method can still solve the wrong problem. Confirm the goal and assumptions before writing code.

Related learning

Variable

Condition

Cash flow

Learning & Skills

External Resources

MDN — Algorithm