📋 Algorithm

3rd Grade 💻 Coding

An algorithm is a list of exact steps, in a set order, that takes you from the starting point to the solution of a problem or to a result.

Free · US Letter · no sign-up
Google Classroom Save to Pinterest Email me

Every recipe, set of building instructions or driving directions is an algorithm. For an algorithm to work on a computer, it has to be exact (no “a little” or “about”), in order, and it has to finish after a certain number of steps. You can write the same algorithm in plain English, draw it as a diagram, or write it in any programming language.

The word comes from the name of Muhammad al-Khwarizmi, a Persian mathematician who lived in Baghdad more than a thousand years ago and wrote about step-by-step ways to calculate. A single problem usually has several algorithms that solve it, and programmers pick the fastest or the simplest one.

For example

  • A pancake recipe — mix the flour, eggs and milk, heat the pan, pour the batter, flip when bubbles appear — is an algorithm.
  • Ethan wrote instructions for his grandma: “Tap the green button, then tap Mom’s picture.” That’s an algorithm for starting a video call.

📌 Remember: Algorithm = recipe: exact steps, in order, until you reach the result.

Quick quiz

  1. What is an algorithm?

  2. The word “algorithm” comes from whose name?

  3. Which property is important for an algorithm?

🔎 Ask Thinkapedia another question