What Is an Algorithm? Learn Thinking Before Programming

Learn algorithmic thinking before coding with simple recipes, input-output, decisions, loops, memory, debugging, flowcharts and visual games.

This page is for someone who knows no programming yet. The goal is not to memorize Java, Python, or TypeScript; it is to build the thinking pattern behind every programming language.

What you can learn on this page

  • 1. Algorithm = A recipe you can follow without getting lost — When baking a cake, you measure ingredients, mix them, then put the tray in the oven — in that exact order. If you reverse the steps, putting the tray in first and mixing later, the cake simply will not work. The thought-provoking question here is: why does or
  • 2. Input -> Process -> Output — Put oranges into a juicer: it squeezes them and juice comes out. Orange is input, squeezing is process, juice is output. Here is the thought-provoking question: what happens if you put a stone in the juicer? Nothing useful comes out — because the input was wro
  • 3. If this happens, do that; otherwise do something else — Before leaving the house in the morning, you check the weather: if it is raining, you take an umbrella; if it is not, you leave without one. That is one decision point — one condition, two possible outcomes. The thought-provoking question: is every decision al
  • 4. Loop = Repeat the same action as many times as needed — A teacher taking attendance asks each student one by one: "Are you here?" — the same action repeats for every student, only the target changes. The thought-provoking question: could the teacher just ask the whole class at once? No — and neither can a
  • 5. Memory box = Store information — Imagine a sticky note that says “score: 0”. Every time you get a correct answer, you erase the old number and write the new one. That sticky note is a memory box — it holds a single piece of information that can be updated. The thought-provoking question: can
  • 6. Debug = Find where the recipe broke — If your toast burns, you do not throw away the toaster and give up. You check step by step: was the bread the wrong type? Was the cheese missing? Was the heat too high? Was the timer wrong? By eliminating each suspect, you narrow down the real cause. The thoug
  • 7. Flowchart = Draw the algorithm as a picture — Think of a treasure map: boxes mark the stops, arrows show the direction, and diamond shapes mark decision points where two paths diverge. You start at the beginning, follow the arrows, and at each decision point you take one branch based on the condition. The