Quelpr

CAPE Computer Science Unit 2 · 2015 · Paper 2 · Question 2(b)(ii)

A linked list contains three nodes with values 3, 4, and 5, where 3 is at the head, 4 is in the middle, and 5 is at the end.

Explain how to delete the integer 3 from the linked list.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 2(a)Draw the array after the first, second, and third passes of selection sort (3 diagrams total).[6 marks]
  2. 2(b)(i)Draw a diagram to show the linked list.[3 marks]
  3. 2(c)(i)Write code to obtain the value of an integer, target, from the user.[2 marks]
  4. 2(c)(ii)Write code to search for target in the sorted array numbers using binary search. Print its location if found; otherwise print -1.[10 marks]

More practice: the rest of this paper · more Abstract Data Types (ADTs) questions · all CAPE Computer Science Unit 2 past papers