A Level Computer Science 9618, topic 9.2

Algorithms: past paper questions

70 Cambridge A Level Computer Science 9618 questions on Algorithms (9.2) from 22 papers, 2023 to 2026. Open the paper or try a question free.

Practising builds a set from this topic, free with an account. One question opens straight away, with no account.

Questions
70
Papers
22
Years
2023 to 2026
Total marks
656
Average per question
9.4 marks
Largest question
19 marks

By type: Structured 70

How hard the questions are

  • Recall12
  • Apply36
  • Analyse22
  • Not banded0

Derived from the command word Cambridge prints in each question, banded by a fixed table beside the syllabus's own definitions. A question printing no command word is unbanded: unknown, not middling.

Command words

  • writeRecall36 questions

    write an answer in a specific way

  • completeApply29 questions

    add information to an incomplete diagram or table

  • explainAnalyse14 questions

    set out purposes or reasons / make the relationships between things clear / say why and/or how and support with relevant evidence

  • describeApply11 questions

    state the points of a topic / give characteristics and main features

  • suggestAnalyse7 questions

    apply knowledge and understanding to situations where there are a range of valid responses in order to make proposals / put forward considerations

  • stateRecall6 questions

    express in clear terms

  • calculateApply5 questions

    work out from given facts, figures or information

  • useApply4 questions
  • commentAnalyse3 questions

    give an informed opinion

  • drawApply3 questions

    draw a line to match a term with a description

Where the questions come from

By year

  • 20268
  • 202525
  • 202420
  • 202317

By session

  • May/June42
  • Oct/Nov28

By paper

  • Paper 269
  • Paper 41

Questions on this topic

Showing 30 of 70, spread across the years. Open one to write your answer and have it marked.

  • Question 4May/June 2026, paper 21Structured4 marks

    An algorithm is expressed as: • A user inputs a sequence of integer values. • The process will calculate the number of positive integers.

    Try this question
  • Question 2Oct/Nov 2025, paper 21Structured5 marksHas a diagram

    Data is a global 1D array containing 30 elements of type STRING An algorithm will output: • all non-blank elements (elements that do not contain an empty string) • the final total of the number of elements output.

    Try this question
  • Question 2Oct/Nov 2024, paper 21Structured6 marks

    2 A program uses three global integer variables HH, MM and SS to represent the current time in hours, minutes and seconds using the 24-hour clock notation. Midnight would be represented as 00:00:00 (HH:MM:SS).

    Try this question
  • Question 4Oct/Nov 2023, paper 21Structured9 marks

    A global array is declared in pseudocode as follows: DECLARE Data : ARRAY[1:150] OF STRING A function TooMany() will: 1. take two parameters: • a string (the search string) • an integer (the maximum value) 2.

    Try this question
  • Question 8May/June 2026, paper 21Structured6 marks

    Global array MyData contains the values shown.

    Try this question
  • Question 4Oct/Nov 2025, paper 21Structured9 marks

    A program contains a global 1D array Number consisting of 20 elements of type REAL A procedure Store() will input a sequence of up to 20 real values, one value at a time.

    Try this question
  • Question 3Oct/Nov 2024, paper 21Structured9 marks

    3 An algorithm will output the last three lines from a text file Result.txt The lines need to be output in the same order as they appear in the file. Assume: • Three variables LineX, LineY and LineZ will store the three lines.

    Try this question
  • Question 5Oct/Nov 2023, paper 21Structured7 marks

    An algorithm is designed to find the smallest numeric value from an input sequence and count how many numeric values have been input.

    Try this question
  • Question 9May/June 2026, paper 21Structured18 marksHas a diagram

    A hotel has three floors numbered 0 to 2 (floor 0 is the ground floor). There are 15 rooms on each floor. The hotel gets many enquiries from customers to check if a room is available that day.

    Try this question
  • Question 5Oct/Nov 2025, paper 21Structured6 marks

    A program is being designed in pseudocode.

    Try this question
  • Question 6Oct/Nov 2024, paper 21Structured9 marks

    6 A factory produces food items. The items must be used within a certain number of days after their production date. The number of days is known as the shelf life.

    Try this question
  • Question 2Oct/Nov 2023, paper 22Structured7 marksHas a diagram

    An algorithm will: 1. input a sequence of integer values, one at a time 2. ignore all values until the value 27 is input, then sum the remaining values in the sequence 3.

    Try this question
  • Question 3May/June 2026, paper 22Structured6 marks

    3 A computer game uses a text file named WordList.txt containing 10000 words, all in lower case. Each word is unique and is stored on a separate line of the text file. An efficient algorithm is needed to check that a word input by the user is stored in WordList.txt.

    Try this question
  • Question 6Oct/Nov 2025, paper 21Structured9 marks

    Students are learning about a simple check digit method for data validation. In this method, a single check digit is appended to the end of an original number to give a new number.

    Try this question
  • Question 4Oct/Nov 2024, paper 22Structured6 marks

    A global integer variable Tick is always incremented every millisecond (1000 times per second) regardless of the other programs running. The value of Tick can be read by any program but the value should not be changed. Assume that the value of Tick does not overflow.

    Try this question
  • Question 4Oct/Nov 2023, paper 22Structured9 marks

    A procedure Count() will: 1. input a value (all values will be positive integers) 2. count the number of odd values and count the number of even values 3.

    Try this question
  • Question 5May/June 2026, paper 22Structured10 marks

    5 A programmer has defined a global 1D array Numbers of type INTEGER, which can store 1000 integers. The lower bound of the array Numbers is set to 1. Each element of the array has been initialised with a random integer in the range 200 to 99999.

    Try this question
  • Question 8Oct/Nov 2025, paper 21Structured17 marks

    A program is being developed to manage student book loans from a college library. Students may borrow up to five books at a time from the library. The programmer has defined a record type to define each loan.

    Try this question
  • Question 6Oct/Nov 2024, paper 22Structured9 marks

    A shop sells sandwiches and snacks. The owner chooses a ‘daily special’ sandwich which is displayed on a board outside the shop. Each ‘daily special’ has two different fillings and is made with one type of bread.

    Try this question
  • Question 5Oct/Nov 2023, paper 22Structured6 marks

    A global 1D array of integers contains four elements, which are assigned values as shown: Mix[1] ← 1 Mix[2] ← 3 Mix[3] ← 4 Mix[4] ← 2 A procedure Process() manipulates the values in the array.

    Try this question
  • Question 4May/June 2026, paper 23Structured4 marks

    An algorithm is expressed as: • A user inputs a sequence of integers. • The user will input value –1 to indicate there are no more integers to be input. • The program will calculate the total number of integers greater than 120.

    Try this question
  • Question 2Oct/Nov 2025, paper 22Structured5 marksHas a diagram

    Data is a global 1D array containing 20 elements of type REAL An algorithm will: • input a sequence of real values, one at a time • assign each value to…

    Try this question
  • Question 2Oct/Nov 2024, paper 23Structured7 marks

    An algorithm will: 1. prompt and input a sequence of 100 integer values, one at a time 2. sum the positive integers 3.

    Try this question
  • Question 8Oct/Nov 2023, paper 22Structured18 marks

    A class of students are developing a program to send data between computers. Many computers are connected together to form a wired network. Serial ports are used to connect one computer to another.

    Try this question
  • Question 6May/June 2026, paper 23Structured13 marksHas a diagram

    A linked list is an example of an Abstract Data Type (ADT). A linked list is implemented using: • a 1D array for the data items • a 1D array for the link pointers • a start pointer. The linked list maintains the data items in alphabetical order.

    Try this question
  • Question 3Oct/Nov 2025, paper 22Structured10 marks

    A text file OldFile.txt contains IDs, names and email addresses for members of a club. Three information items are stored for each member and each item is stored on a separate line.

    Try this question
  • Question 4Oct/Nov 2024, paper 23Structured12 marks

    An examination paper has a maximum of 75 marks. One of five pass grades (A to E) is assigned, depending on the mark obtained. The lowest mark for a given grade is known as the grade boundary.

    Try this question
  • Question 2Oct/Nov 2023, paper 23Structured9 marksHas a diagram

    Data is a 1D array of integers, containing 30 elements. All element values are unique. An algorithm will output the index of the element with the smallest value.

    Try this question
  • Question 7May/June 2026, paper 23Structured9 marks

    Study the pseudocode algorithm. Numbers will be copied into the Data array.

    Try this question
  • Question 4Oct/Nov 2025, paper 22Structured13 marks

    A quiz has nine questions. There are: • five easy questions each worth 3 points • four hard questions each worth 5 points. At the end of the quiz the points for each correctly answered question are added to give a total score.

    Try this question