Part 1: Fundamental Concepts of Computing

6. Problem Solving & Computational Thinking

Problem Solving & Computational Thinking

Computational thinking is the mindset that lets you approach any problem the way a computer scientist would — breaking it down, spotting patterns, ignoring irrelevant detail, and writing a clear plan. It is a skill that helps far beyond programming, but it is essential for it. Four pillars form its foundation.

The Four Pillars

  • Decomposition — break a big, scary problem into smaller problems you can solve one at a time.
  • Pattern recognition — notice similarities and repetition, so you can reuse a solution instead of inventing a new one each time.
  • Abstraction — focus on the important details and ignore the rest, creating a simpler model of the problem.
  • Algorithmic thinking — design a clear, ordered sequence of steps that solves the problem and can be repeated reliably.
PillarWhat it meansReal-world example
DecompositionSplit into smaller partsPlanning a trip: book flights, book hotel, pack bags, arrange transport — handled separately.
Pattern recognitionSpot what repeatsEvery morning routine is similar; you reuse the same checklist instead of rethinking it.
AbstractionKeep only what mattersA subway map hides exact distances and streets, showing just stops and lines.
Algorithmic thinkingDesign repeatable stepsA recipe that anyone can follow to get the same dish every time.

Putting the Pillars Together

Suppose you want to write a program that finds the cheapest flight for a trip. Decomposition splits it into "get the list of flights", "compare their prices", and "report the lowest". Pattern recognition notices that "find the cheapest" is the same shape as "find the smallest number" — a problem you already know how to solve. Abstraction lets you ignore airline logos and seat colours and treat each flight as simply a price. Algorithmic thinking turns it into ordered steps you could write as pseudocode. The hard, fuzzy request has become a clear plan.

A General Problem-Solving Recipe

  1. Understand the problem: what are the inputs, and what output do you want?
  2. Decompose it into smaller sub-problems.
  3. Plan an algorithm for each part (pseudocode or flowchart).
  4. Dry run your plan with example values to check it works.
  5. Translate the plan into code.
  6. Test with many inputs, including tricky edge cases, and fix problems.

Practice Exercises

Try these on paper — describe your approach using the four pillars and write pseudocode. No coding required yet:

  • Design steps to find the average of a list of exam scores.
  • Describe how you would check whether a word is a palindrome (reads the same backwards).
  • Plan an algorithm to make change for a purchase using the fewest coins.
  • Decompose the task "organise a birthday party" into sub-tasks, then sub-sub-tasks.
  • Spot the repeating pattern in adding up the numbers 1 to 100, and describe a shortcut.

Mastering computational thinking is what separates someone who memorises code from someone who can genuinely solve new problems. Every later topic in this course is an application of these four pillars.