What is an Algorithm?

An algorithm is like a recipe that tells you exactly how to make something, step by step.

Imagine you're making your favorite sandwich. You have a list: first get bread, then add peanut butter, then jelly, and finally put the top slice on. That’s an algorithm, it gives clear instructions for turning ingredients into a finished product.

Like a Step-by-Step Game

Think of an algorithm like playing a board game with strict rules. You move your piece based on what the card says: “Take 2 steps forward,” or “Go back to start.” Every action follows a rule, just like every step in an algorithm follows a specific instruction.

Why Algorithms Are Cool

Algorithms are used everywhere, even in things you touch daily. When you sort your toys by color or size, you're using an algorithm. When the elevator decides which floor to go to next, it's following an algorithm too!

So whether you're making a sandwich or playing a game, or even just organizing your room, you’re using algorithms all the time!

Take the quiz →

Examples

  1. A recipe for making a sandwich, step by step, no confusion.
  2. Sorting your toys from smallest to largest like a robot.
  3. Finding the shortest path from school to home.

Ask a question

See also

Discussion

Recent activity