Question 2

OCR Computer Science June 2017 Paper 1A level11 marks

On the specification

(a)(i)
1.4 Data types, data structures and algorithms
(a)(ii)
1.4 Data types, data structures and algorithms
(b)
1.4 Data types, data structures and algorithms
Question text

2 A coach company offers tours of the UK. (a) A linked list stores the names of cities on a coach tour in the order they are visited. London Oxford Birmingham Manchester null (i) Describe what is meant by the term ‘linked list’. [3] (ii) The tour is amended. The new itinerary is: London, Oxford, Manchester then York. Explain how Birmingham is removed from the linked list and how York is added. You may use the diagram below to illustrate your answer. London Oxford Birmingham Manchester null [4] The program stores records about its customers. (b) Often an individual customer’s record needs to be accessed. This is done by searching using the Customer ID. Explain why a hash table is better suited than a linked list to store the customer records, particularly as the company acquires more customers. [4]