Revise360The course

Paper 2 · Topic 2.1

2.1 Algorithms

Computational thinking, designing algorithms, searching and sorting. Taught in 12 lessons, each with its own 360° room, alongside the unit's PowerPoints, worksheets and lesson plans, and assessed on paper at the end.

The Breakdown bay lesson room.
2.1 · Lesson 2 Breakdown bay

What this topic covers

12 lessons, in teaching order.

Each lesson opens with retrieval from earlier lessons, is taught from its PowerPoint, and is explored in its room, where every station has a short explainer and questions. The topic follows the OCR J277 specification, section 2.1.

  1. Lesson 1: Abstraction studio

    What is abstraction, and why is it needed?

    Pupils learn to

    • know what is meant by the term abstraction
    • know some examples of abstraction
    • understand why abstraction is needed in computational thinking

    In the room Computational thinking · What abstraction is · A worked example · Models of the world · Abstraction in programs · Answering abstraction questions · Final challenge: keep or cut

  2. Lesson 2: Breakdown bay

    What is decomposition, and how does a structure diagram help?

    Pupils learn to

    • know what is meant by problem decomposition
    • know the advantages of decomposition when programming
    • know how to produce a structure diagram

    In the room What decomposition is · Why it helps · Structure diagrams · Worked example · Decomposition and abstraction together · Answering decomposition questions · Final challenge: build the tree

  3. Lesson 3: Algorithm workshop

    What do we mean by thinking algorithmically?

    Pupils learn to

    • understand how to solve problems by applying algorithmic thinking
    • be able to identify the inputs, processes and outputs of a problem

    In the room What an algorithm is · Algorithmic thinking · Inputs, processes and outputs · Working a problem · A worked example · Answering algorithm questions · Final challenge: in, through, out

  4. Lesson 4: Flowchart factory

    How can an algorithm be described without ambiguity?

    Pupils learn to

    • know the flowchart symbols
    • know how to make a flowchart
    • understand how to construct a program from a flowchart

    In the room The five symbols · Reading a flowchart · Decisions · Loops in flowcharts · Flowchart or pseudocode? · Drawing a flowchart in the exam · Final challenge: build the flowchart

  5. Lesson 5: Pseudocode press

    How is an algorithm written so that anyone can follow it exactly?

    Pupils learn to

    • know what is meant by the term pseudocode
    • understand how to write pseudocode
    • understand the OCR reference language

    In the room What pseudocode is · Variables and assignment · Selection · Iteration · Arrays · Reading the reference language · Final challenge: read the code · Functions · Procedures

  6. Lesson 6: Search corridor

    How does a linear search work, and when is it the right choice?

    Pupils learn to

    • understand the linear search algorithm
    • understand that it is inefficient but simple and needs no ordering

    In the room How it works · Its one great advantage · Counting the checks · Why it gets slow · Writing it down · Answering search questions · Final challenge: search it

  7. Lesson 7: Halving hall

    How does a binary search work, and why is it so much faster?

    Pupils learn to

    • understand the binary search algorithm
    • know the condition a list must meet for a binary search to work
    • understand which searching algorithm is quicker

    In the room How it works · The one condition · Why it is so fast · Comparing the two searches · Writing it down · Answering binary search questions · Final challenge: halve it

  8. Lesson 8: Bubble bay

    How does a bubble sort work, and why is it slow?

    Pupils learn to

    • understand the bubble sort algorithm
    • be able to show the steps of a bubble sort
    • know the advantages and disadvantages of a bubble sort

    In the room One comparison · One pass · Repeating the passes · Why it is slow · Its advantages · Answering bubble sort questions · Final challenge: bubble it

  9. Lesson 9: Split and insert

    How do merge sort and insertion sort work, and how do they compare with a bubble sort?

    Pupils learn to

    • understand the merge sort algorithm
    • understand the insertion sort algorithm
    • be able to compare the three sorting algorithms

    In the room Merge sort: splitting · Merge sort: merging · Merge sort: the whole thing · Insertion sort · Comparing the three sorts · Answering sorting questions · Final challenge: sort it out

  10. Lesson 10: Fault finder

    What kinds of error occur when programming, and how are they found?

    Pupils learn to

    • know what a syntax error is
    • know what a logic error is
    • be able to identify errors in code and suggest fixes

    In the room Syntax errors · Logic errors · Telling them apart · Finding the line · Suggesting a fix · Answering error questions · Final challenge: debug it

  11. Lesson 11: Trace room

    How and why do programmers use a trace table?

    Pupils learn to

    • know what a trace table is
    • understand how and why trace tables help with debugging
    • know how to complete a trace table

    In the room What a trace table is · Filling one in · Tracing a loop · Tracing selection · Finding the bug with a trace · Trace tables in the exam · Final challenge: trace it

  12. Lesson B: Algorithm arena

    Two minutes of searches to run, sorts to complete and bugs to find, with speed bonuses and streaks. The challenges get harder as you go.

    In the room Algorithm arena

  13. End-of-topic test

    An assessment sat on paper, with a mark scheme for the teacher.

Key words

The words to use in an answer.

Abstraction
Removing or hiding details that do not matter to a problem, so that you can focus on the details needed to solve it.
Algorithmic thinking
Working out the steps needed to solve a problem and the order they must happen in, so the solution works for every similar problem.
Binary search
A search that repeatedly checks the middle item of a sorted list and discards the half that cannot hold the target, until it is found or none remain.
Bubble sort
A sort that repeatedly passes through a list, comparing neighbouring pairs and swapping any in the wrong order, until a pass makes no swaps.
Bug
A fault in a program that stops it running or makes it behave in a way the programmer did not intend.
Comparison
Checking two values against each other to see whether they are equal, or which is larger, so an algorithm can decide what to do next.
Computational thinking
Approaching a problem in a way that lets a computer solve it, using abstraction, decomposition and algorithmic thinking together.
Debugging
Finding and correcting the errors in a program, for example by testing it with known inputs or tracing it by hand.
Decision
A point in an algorithm where a true or false condition chooses which path to follow next, drawn as a diamond in a flowchart.
Decomposition
Breaking a complex problem down into smaller sub-problems that are each easier to understand, solve, test and share out.
Divide and conquer
An approach that repeatedly splits a problem into smaller parts that are easier to solve, used by both binary search and merge sort.
Dry run
Working through an algorithm or program by hand, line by line, with test data, to see what it does without using a computer.
Efficiency
How few steps, such as comparisons, and how little memory an algorithm needs to finish its task, especially as the amount of data grows.
Fix
A specific change to a program that corrects an error, stating exactly what to change and what to change it to.
Flowchart
A diagram that shows an algorithm using a standard symbol for each kind of step, joined by arrows showing the order they happen in.
In place
Sorting a list within its own memory, by moving items around inside it, without needing a second copy of the list.
Input/output
The flowchart step where data enters the algorithm or a result is given out, drawn as a parallelogram.
Insertion sort
A sort that takes each item in turn and inserts it into its correct place within a growing sorted section at the start of the list.
Linear search
A search that checks each item in a list in turn, starting from the first, until the target is found or the end is reached.
Logic error
An error where the program runs without crashing but gives a wrong or unexpected result, because its instructions do the wrong thing.
Merge
Combining two sorted lists into one sorted list by repeatedly comparing their first items and taking the smaller one.
Merge sort
A sort that repeatedly splits a list in half until each part holds one item, then combines the parts back together in order until one sorted list remains.
Midpoint
The middle position of the part of a list still being searched, found by adding the left and right indexes and dividing by two, rounded down.
Model
A simplified representation of a real situation that keeps only the details needed for the problem being solved.

And 18 more in the topic glossary, at the back of the pupil workbook.

Common mistakes

Where pupils go wrong.

Ideas that cost marks in this topic, each with the idea that replaces it.

  • A binary search works on any list.The list has to be in order first. A linear search works on an unsorted list.
  • Decomposition and abstraction are the same thing.Decomposition breaks a problem into smaller parts. Abstraction removes the detail that does not matter.
  • Merge sort and bubble sort give different answers.Both end with the same sorted list; they differ in how they get there and how many comparisons it takes.
  • A flowchart decision box can have one way out.A decision always has at least two exits, one for each outcome, such as Yes and No.

Using it

In the lesson, at home and in intervention.

For teachers

  • The unit's lesson PowerPoints, worksheets and lesson plans, and the end-of-topic assessment with its mark scheme, in the Teacher Portal.
  • Set any lesson for a class with a due date, and see who has finished.
  • Reports show each station as Secure, Revise or Focus from pupils' first attempts, so a small group can go straight back to the right one.
  • Ask for a teacher key

For pupils

  • Sign in with the card your teacher gives you and open any lesson in this topic.
  • Write each key fact in your own words on the worksheet before you check it.
  • In Quiz Mode, pick this topic: every lost mark names the station that teaches it.
  • Pupil sign in