Question 2(a) 2017 · May-June · Paper 41 · 4 marks
Reveal official mark-scheme answer
Official answer for Question 2
Part (a)
Question 1
mark for the declaration of the array.
Question 4
Question 1
Question 1
Show text version of question
Question 2
Part (a)
Question 2
A hash table has these associated operations:
- create hash table
- insert record
- search hash table
Each record consists of a unique customer ID, the record key, and other customer data.
Part (a)
The following pseudocode declares a customer record structure.
TYPE CustomerRecord CustomerID : INTEGER Data : STRING ENDTYPE
The hash table is to be implemented as a 1D array Customer with elements indexed 0 to 199. The procedure to create a hash table will declare and initialise the array by storing 200 records with the CustomerID field in each record set to 0.
Complete the pseudocode.
PROCEDURE CreateHashTable()
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
ENDPROCEDURE
Why this question appears here
92% assigned-topic match · Data types and structures › Data types and records
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_s17_qp_41.pdf
