Algorithm: Definition, Meaning, and Examples

An algorithm is a set of steps you can follow to solve a problem or get a result. A computer can follow those steps, but so can you. Think of finding the largest number in a pile of cards without having to put every card in order.

On this page

Try an algorithm with three cards

Suppose your cards read 4, 9, 6 and you can look at only one at a time. Start by remembering the first number, 4. Look at the next card. If it is larger than the number you remember, remember the new one instead. Keep doing that until you reach the end. The number you remember is the answer.

“The largest card is 9” is the result. Here is how you got it. When you saw 9, you replaced 4 with 9. When you saw 6, you kept 9. Those same steps work on 8, 3, 8. The last card ties the first, so there is no need to change the answer. This particular method assumes you have at least one card.

Algorithm, instruction, or computer program?

“Find me the largest number” states the goal. It leaves you to work out how. The comparison rule above is an algorithm because it tells you what to do at each step and when to stop. A program could put that rule into words a particular computer understands. Two people could write different programs that follow the same algorithm.

At school, the written steps for long division are another example. On a maps app, an algorithm might compare routes to find one with a short estimated travel time. A route with the fewest miles could still take longer. The answer depends on the goal the rules were written to meet. The U.S. National Institute of Standards and Technology describes an algorithm in computing in terms of getting a desired result.

What does “the algorithm” mean online?

“My feed keeps showing me gardening videos. The algorithm must think I like tomatoes.” The speaker means the system choosing or ordering posts. An app might rank a video higher after you watch similar clips. That is one possible signal. The sentence alone cannot tell you exactly how that app ranks its posts.

Pronunciation, spelling and word family

Say AL-guh-rith-um. The th sounds like the one in this. The noun is an algorithm, plural algorithms. Algorithmic is the adjective, as in algorithmic recommendations. In spelling, the middle is ri, even though the ending sounds a little like rhythm.

The name traces back to the mathematician al-Khwarizmi, whose writings helped spread methods of arithmetic. The older word algorism is a real word in its own right. The word history of algorithm connects the two spellings.

Practice using “algorithm”

Choose an answer to see why it fits or what clue to look for. You can change your answer.

Practice questions and answers

Run the rule

The cards are 7, 2 and 5. Keep the largest seen so far. Which number is left?

  • 7 Correct. Yes. Neither 2 nor 5 is larger than 7.
  • 5 That is the last card. The rule keeps the largest card seen, even when it came first.

Goal or algorithm?

Which instruction gives enough detail to find the lowest price on a nonempty list?

  • Find the best deal. That states a goal. It leaves open what counts as best and how to compare prices.
  • Keep the first price, then replace it whenever you see a lower one. Correct. Yes. After checking every price, the one you kept is the lowest.

Who can use it?

A child follows the card rule with paper cards. Did the child use an algorithm?

  • Yes, the steps are the algorithm. Correct. Exactly. The same method can be carried out by hand or by a computer.
  • Only if the child also wrote code. Code is one way to express the steps. The child can carry them out without a program.
Copyright © 2026 - U.S. Dictionary
Privacy Policy
⚡ Match Highlights: definitions/algorithm - Pertandingan Hari Ini