Algorithms — Technology, 14–17 years
An algorithm is a precise plan for solving a problem or completing a task. It helps people and computers act in a reliable order.
A recipe for a task
An algorithm is a set of steps that turns a starting situation into a result. The steps must be clear enough that another person, or a computer, can follow them without guessing. A recipe, a sat-nav route and a sorting method are all everyday examples.
Why make the steps exact?
People first used repeatable procedures to manage calculations, records and machines without relying on one person’s memory. Computers made this need sharper: they do not understand a vague instruction such as “choose a good option”. An algorithm replaces guesswork with rules that can be checked and improved.
Finding the largest number
Take the list 6, 2, 9, 4. Start by calling 6 the largest. Compare 2 with 6, so keep 6; compare 9 with 6, so replace it; compare 4 with 9, so keep 9. After one pass, the answer is 9, and the same plan works for a list of any length.
A correct plan can be slow
A common mistake is to judge an algorithm only by whether it gives the right answer. That seems reasonable because correctness matters first, but two correct methods can need very different amounts of time or memory. As data grows, a slow method may become unusable even though its answer is perfect.
Algorithms around you
Search engines use algorithms to rank pages, maps use them to suggest routes, and streaming services use them to choose recommendations. These systems follow rules built by people and trained or adjusted with data. They are useful, but their results can reflect the choices and limits built into the method.
Keep exploring
Other languages
Loading MyLeoNes™…