ExamBank Scot · AH Computing Science question bank · All AH Computing Science questions
3 marks · Linked lists
State the value that would be stored in the head pointer of the sorted linked list. Copy and complete the table below to indicate the value of the pointer of each node in the sorted linked list. Node Contents Pointer 523 purple 517 green 519 blue 514 red A single linked list is used to store colour names. The contents of each node of the list are in the form: memory address data pointer item The diagram below shows the contents of the linked list. 523 517 519 514 purple green blue red The contents of the linked list are sorted into alphabetical order of colour name.
519 Node Pointer 523 514 517 523 519 517 514 null 1 mark for pointers 523, 517 and 519 correct. 1 mark for pointer 514 correct.