• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Start selling Create your account
Document preview thumbnail
Preview 4 out of 40 pages
Exam (elaborations)

2026 A-Level Ocr Computer Science - Algorithms And Programming

Document preview thumbnail
Preview 4 out of 40 pages

2026 A-Level Ocr Computer Science - Algorithms And Programming

Content preview

Wednesday 17 June 2026 – Morning
A Level Computer Science
H446/02 Algorithms and programming
Time allowed: 2 hours 30 minutes

You can use:
* 1 8 8 5 9 9 3 8 7 3 *




• a ruler (cm/mm)
• an HB pencil
Do not use:
• a calculator




* H 4 4 6 0 2 *




Please write clearly in black ink. Do not write in the barcodes.

Centre number Candidate number


First name(s)

Last name


INSTRUCTIONS
• Use black ink. You can use an HB pencil, but only for graphs and diagrams.
• Write your answer to each question in the space provided. If you need extra space use
the lined page at the end of this booklet. The question numbers must be clearly shown.
• Answer all the questions.

INFORMATION
• The total mark for this paper is 140.
• The marks for each question are shown in brackets [ ].
• Quality of extended response will be assessed in questions marked with an
asterisk (*).
• This document has 40 pages.

ADVICE
• Read each question carefully before you start your answer.




© Cambridge OCR 2026 [601/4911/5] Cambridge OCR is an exempt Charity
DC (WW/CT) 378411/4 Turn over


for more:

, 2
BLANK PAGE




DO NOT WRITE ON THIS PAGE




© Cambridge OCR 2026



for more:

, 3
Section A

1 Data structures store data.

(a) One data structure is a stack.

(i) Give two characteristics of a stack.

1 .......................................................................................................................................................

..........................................................................................................................................................

2 .......................................................................................................................................................

..........................................................................................................................................................
[2]

(ii) A function pop() removes an item of data from a stack.

Describe how the function pop() will work.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..................................................................................................................................................... [3]




© Cambridge OCR 2026 Turn over

for more:

, 4
(b) A second data structure is a queue.

A queue is stored as a 1-dimensional array of 100 integers with the identifier intQueue.

The queue has two pointers:

• head that stores a pointer to the first item in the queue. It has a starting value of –1
• tail that stores a pointer to the last item in the queue. It has a starting value of –1

(i) The function enqueue():

• takes an integer parameter to insert into the queue
• stores the parameter in the queue, updates the relevant pointer and returns true if the
queue is not full
• returns false if the queue is full.

Complete the function enqueue() using either pseudocode or program code.

function enqueue(insertData)

if tail > = ............................................ then

return false

endif

if head == ............................................ then

head = 0

tail = 0

else

tail = ............................................

endif

intQueue[............................................] = insertData

............................................

endfunction
[5]




© Cambridge OCR 2026



for more:

Document information

Study Level
Uploaded on
October 3, 2026
Number of pages
40
Written in
2026/2027
Type
Exam (elaborations)
Contains
Only questions
£4.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
WorkEveryday101
4.1
(10)
Sold
60
Followers
0
Items
204
Last sold
3 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions