• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 4 fuera de 40 páginas
Examen

2026 A-Level Ocr Computer Science - Algorithms And Programming

Document preview thumbnail
Vista previa 4 fuera de 40 páginas

2026 A-Level Ocr Computer Science - Algorithms And Programming

Vista previa del contenido

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:

Información del documento

Nivel de Estudio
Tema
Subido en
3 de octubre de 2026
Número de páginas
40
Escrito en
2026/2027
Tipo
Examen
Contiene
Solo preguntas
$6.89

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
WorkEveryday101
4.3
(12)
Vendido
62
Seguidores
0
Artículos
204
Última venta
3 días hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes