ENES

Algorithm

A precise, step-by-step method for solving a problem or doing a task.

A flowchart: start, check a condition, take one of two paths, and loop back until the task is done

An algorithm is a finite list of clear steps that, followed exactly, solves a problem. Long division as you learned it at school is an algorithm. So is "to find a word in a paper dictionary, open it in the middle, check whether the word comes before or after, and repeat with that half". Computers need algorithms because they cannot improvise: every program is algorithms written in a programming language.

The same problem can often be solved by several algorithms, and they are not equally good. Checking a dictionary page by page from the start works, but halving it each time (called binary search) finds any word in a few dozen steps even in a huge book. Choosing a smarter algorithm usually matters far more than buying a faster computer.

In everyday news the word is used more loosely, as in "the algorithm decided what you see". That usually means a ranking or recommendation system: software that scores posts, videos or ads and puts the highest scores first. Those systems are built from many algorithms, often combined with machine learning models trained on what people clicked before.

Keep in mind

Go deeper

Related terms

More in Software