OCR GCSE Computer Science 2.1 Algorithms: computational thinking, designing algorithms, trace tables, searching and sorting
A deep-dive OCR GCSE Computer Science guide to topic 2.1 Algorithms. Covers computational thinking (abstraction, decomposition, algorithmic thinking), designing algorithms with pseudocode and flowcharts, trace tables, the two searches (linear, binary) and the three sorts (bubble, insertion, merge), with the comparisons Paper 2 rewards.
Reviewed by: AI editorial process; not yet individually human-reviewed
Jump to a section
What topic 2.1 actually demands
Algorithms is the foundation of Component 02. It is examined in Paper J277/02 and tests both understanding (computational thinking, how the standard algorithms work) and skill (designing algorithms, tracing them, finding and fixing errors). You need the three principles of computational thinking, the ability to write and read pseudocode and flowcharts, fluency with trace tables, and a clear description and comparison of the two searches and three sorts.
This guide ties together the five dot-point pages for the topic.
Computational thinking
Three principles underpin every algorithm. Abstraction removes or hides unnecessary detail to focus on what matters. Decomposition breaks a large problem into smaller sub-problems that can be solved separately. Algorithmic thinking identifies the steps and puts them in a clear, logical order. Used together, they turn a hard problem into an algorithm you can write and test.
Designing algorithms
Plan an algorithm by identifying its inputs, processes and outputs. Present it as pseudocode (OCR shows it in the Exam Reference Language: = for assignment, if ... then ... elseif ... else ... endif, for ... to ... next, while ... endwhile, do ... until) or as a flowchart (terminator, parallelogram for input/output, rectangle for a process, diamond for a decision). You must also interpret, correct and refine algorithms others have written, which usually means spotting a bug or adding validation.
Trace tables
A trace table follows an algorithm by hand, with a column for each variable and a new row each time a value changes. It is the standard way to find an algorithm's output, to debug it, and to determine its overall purpose (summing, averaging, finding a maximum, sorting).
Searching
Linear search checks each item in turn and works on any list, but is slow on large lists. Binary search needs a sorted list, checks the middle, and discards the half that cannot contain the target, halving the work each step, so it is much faster on large sorted lists.
Sorting
Bubble sort swaps adjacent pairs across repeated passes until no swaps occur. Insertion sort inserts each item into a growing sorted section at the start. Merge sort splits the list down to single items then merges them back in order (divide and conquer). Bubble and insertion are simple and memory-light but slow on large lists; merge sort is faster on large lists but more complex and uses more memory.
Check your knowledge
A mix of recall and applied questions covering topic 2.1. Attempt them, then check against the solutions.
- Define abstraction and decomposition. (2 marks)
- Name the four standard flowchart symbols and what each is for. (2 marks)
- State the three things every algorithm can be described in terms of. (1 mark)
- State what a trace table is used for. (1 mark)
- State one condition that must be true for a binary search to work. (1 mark)
- Explain why binary search is faster than linear search on a large sorted list. (2 marks)
- Describe what a bubble sort does in one pass. (1 mark)
- Give one advantage of merge sort and one disadvantage. (2 marks)
Sources & how we know this
- OCR GCSE (9-1) Computer Science (J277) specification — OCR (2020)