Algorithms | OCR GCSE Computer Science (J277)

Algorithms

  • 81 questions
  • 5 subtopics
  • J277/02
  • J277/02

Algorithms is examined in J277/02, Computational thinking, algorithms and programming.

It covers abstraction, decomposition and algorithmic thinking, Flowcharts, pseudocode and structure diagrams, trace tables and correcting algorithms, linear and binary search and bubble, merge and insertion sort.

Sample questions from Algorithms

Answer each one closed book first, then open the answer.

  1. Abstraction, decomposition and algorithmic thinking

    What can go wrong if abstraction removes too much detail?

    Show the answer
    A model that ignores an important detail gives inaccurate results. A weather forecast that left out wind speed would make poor predictions.
  2. Abstraction, decomposition and algorithmic thinking

    Why must every step of an algorithm be unambiguous?

    Show the answer
    A computer follows each instruction exactly and cannot guess what was meant. A vague step could be followed in different ways and give different results.
  3. Flowcharts, pseudocode and structure diagrams

    Define the term pseudocode.

    Show the answer
    Pseudocode is a way of writing an algorithm in structured, English-like statements. Pseudocode does not follow the strict syntax of any one programming language.
  4. Flowcharts, pseudocode and structure diagrams

    How is a sub program shown in a flowchart?

    Show the answer
    A sub program is drawn as a rectangle with an extra vertical line down each side. The sub program's own steps can be set out in a separate flowchart.
  5. Trace tables and correcting algorithms

    Which values appear in the total column of a trace table for total = 0, for i = 1 to 3, total = total + i * i, next i?

    Show the answer
    The total column shows 0, then 1, 5 and 14. Each pass adds the square of i, so the final value of total is 14.
  6. Trace tables and correcting algorithms

    Why does the loop count = 1, while count <= 5, print(count), endwhile never end, and how is it fixed?

    Show the answer
    The variable count stays at 1, so the condition is always true and the loop is infinite. A line count = count + 1 must be added inside the loop.
  7. Linear and binary search

    A linear search looks for 15 in [8, 3, 15, 6, 11]. Which items are checked?

    Show the answer
    The search checks 8, then 3, then 15. The target is found at index 2 after three comparisons.
  8. Linear and binary search

    What are the advantages of a binary search over a linear search?

    Show the answer
    A binary search is much faster on large lists. Each comparison removes half of the remaining items, so few comparisons are needed.

The 5 subtopics

One subtopic is one session. Work down the list.

Subtopic What it covers Questions
Abstraction, decomposition and algorithmic thinking Computational thinking, abstraction and decomposition with worked examples, algorithmic thinking, what an algorithm is, and how the principles work together to solve a problem. 16
Flowcharts, pseudocode and structure diagrams Inputs, processes and outputs, structure diagrams, pseudocode, the flowchart symbols for decisions, inputs and outputs, sub programs and loops, and nesting. 16
Trace tables and correcting algorithms Trace tables and why they are used, the output of short algorithms in Exam Reference Language, and finding and fixing errors in given code. 16
Linear and binary search How linear and binary searches work, why a binary search needs sorted data, the midpoint calculation, worked searches through short lists, and the strengths of each. 16
Bubble, merge and insertion sort How bubble, merge and insertion sorts work, worked passes through short lists, merging two sorted lists, and how the three sorts compare. 17
Algorithms is 81 of the 740 questions in the guide.Get the guide, £7

How the guide is worked

Answering a question from memory stores it far better than reading the answer again. The guide runs that as a fixed procedure on one subtopic at a time, about twenty minutes a session.

  1. Step 1 · Closed book

    Cover the answers. Work through one subtopic and write down what you can. Leave blanks where you have nothing.

  2. Step 2 · Open book

    Go back to the top. Read each printed answer and write it out in full, including the ones you had right.

  3. Step 3 · Closed book again

    Same questions, same order, from memory. The gap between pass one and pass three is the session result.

Read the full method, the return schedule and the research behind it.

Nearby topics

All 11 topics Guide overview

OCR GCSE Computer Science Active Recall Guide

Every topic, not just this one. 740 questions with their answers.

£7 GBP
Get the guide

Digital PDF, sent to the email address on your order.