Algorithmic Thinking
Algorithmic thinking means describing a solution as a clear sequence of steps that someone else — or a machine — could follow without guessing.
Name the inputs and the output
Before solving anything, write down what you are given and what you must produce. This prevents work on details that do not affect the result.
State any assumptions. If a list might be empty, say so; an algorithm that only works for full lists is incomplete.
Decompose the problem
Break a large task into smaller tasks you can finish independently. Each small task should have one clear purpose and a testable result.
Look for repeated patterns. When the same operation appears several times, describe it once and reuse it instead of rewriting it.
Trace before you build
Walk through your steps with a small example on paper. A flowchart helps you see branches and loops before you commit to code.
Ask where the steps could go wrong: unusual input, a missing value, or a decision with two equally likely paths.
A simple design checklist
| Question | Why it matters | If you skip it |
|---|---|---|
| What is the input? | Defines the starting point | You solve the wrong case |
| What is the output? | Defines success | No way to test |
| Can it finish? | Prevents endless loops | The program hangs |