← Back to Computer Science

GCSE Computer Science 01 — Problem Solving

Public

Topics include What an algorithm is and why it matters, Decomposition, abstraction and pattern recognition, Selection and iteration in algorithms, Operators, precedence, and Boolean logic, Representing algorithms with flowcharts and pseudocode, Testing algorithms with normal, boundary and invalid data, Standard searching algorithms: linear vs binary, and Standard sorting algorithms: bubble, insertion, merge.

ComputerScience EN
80 cards
Study this deck on Deckloop

Preview Cards

A sample of cards from this deck.

Example explainer

A sample of the AI explainer you can generate for cards in this deck.

What an algorithm is and why it matters

An algorithm is a finite, unambiguous sequence of steps to solve a problem; good algorithms are correct and suitable for the context.

Key points

  • Algorithms must be precise (no ambiguity) and terminate (finish).
  • Correctness means the algorithm gives the right output for all valid inputs, not just one example.
  • Fitness for purpose depends on constraints: input size, time limits, memory, and ease of implementation.
  • You can describe algorithms in pseudocode, flowcharts, or structured English.

Worked example

Question

You need to create an algorithm to find the largest value in a list of exam scores. What steps would you include, and what edge case must you handle?

Solution

Model answer:
1) Set max to the first score.
2) For each remaining score: if it is greater than max, update max.
3) Output max.
Edge case: an empty list (decide how to handle it: reject input, or require at least one score).

Common pitfalls

  • Confusing an algorithm with a program (an algorithm is language‑independent).
  • Only testing with 'nice' inputs and missing edge cases (empty, smallest/largest, duplicates).

Prerequisites

  • Basic input/output ideas
  • Lists/arrays
Further resources