9618/32/O/N/23 question 3: worked solution (October/November 2023, paper 32)

Show as plain text

Cambridge A2 Level Computer Science 9618 · 13.2 File organisation and access Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 2 of 3. Q27 9618/32/O/N/23 original Q3 Structured · 5 marks Worked solution (a) Write: a collision happens when the key fields of two records give the same hash value [1] ... so the location may already be in use , as two records cannot occupy the same address [1] (b) Any one of these methods scores. Use a collision resolution process [1] Linear method: start at the original hashed space and go through the following spaces one by one [1] ... and store the record in the first available slot [1] Other accepted methods: search an overflow area one space at a time and store the record in the first free slot, or let each storage space hold a reference to a chain of items and store the record in the first free space in that chain. KEY IDEA A collision is two keys with the same hash value, and it is solved by storing the record in the next free space, in an overflow area, or in a chain. TOTAL 5 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by TEACHING BY SM. Tap the picture to open it on YouTube.