Cambridge IAL Computer Science study materials
Cambridge IAL Computer Science study resources

Cambridge IAL Computer Science: Computational thinking

Cambridge IAL Computer Science · Work through your exam, one topic at a time.

All guide sections

Computational thinking

Computational thinking

This domain tests whether you can convert a vague problem statement into a precise, finite, terminating procedure, then argue about how much work that procedure does. Marks come from explicit decomposition, justified abstraction, and pseudocode with correct indentation and a stated stopping condition.

The four skills examiners look for

  • Decomposition: splitting a problem into sub-problems that can be solved and tested independently (a booking system becomes seats, payments, cancellations).
  • Abstraction: removing detail that does not affect the result, and saying why it is safe to remove. Keeping a car's registration but not its paint colour is abstraction; deleting data for no reason is not.
  • Pattern recognition: spotting that the same sub-procedure recurs, so it can be written once and reused.
  • Algorithmic thinking: expressing the solution as sequence, selection and iteration, with defined inputs, outputs and termination.

Efficiency

A2 requires Big-O comparison of worst-case growth: linear search O(n), binary search O(log n), bubble and insertion sort O(n²), merge sort O(n log n). Justify the choice with the data: binary search needs a sorted array, so the sort cost may dominate for a single search.

Worked example

Search the sorted list below for 42 using binary search with low/high/mid indices.

[3, 8, 12, 17, 21, 26, 30, 35, 41, 42, 48, 53, 59, 64, 70] - indices 0–14.

  1. low = 0, high = 14, mid = (0+14) DIV 2 = 7 → value 35. 35 < 42, so discard the left half: low = 8.
  2. mid = (8+14) DIV 2 = 11 → value 53. 53 > 42, so high = 10.
  3. mid = (8+10) DIV 2 = 9 → value 42. Match, found at index 9 after three comparisons.

Worst case for 15 items is ⌈log₂15⌉ = 4 comparisons, against 15 for a linear search - but only because the list is already sorted.

Traps that cost marks

  • Recomputing mid without updating low/high first, or forgetting integer division.
  • Applying binary search to unsorted data, or omitting the sorted precondition.
  • Writing a loop with no termination condition, or using < where <= is needed.
  • Confusing abstraction (deliberate, justified omission) with simplification for convenience.
  • Quoting best-case Big-O when the question asks for worst case.