Cambridge A2 Level Computer Science 9618 · 13.2 File organisation and access

Q27 · 9618/32/O/N/23 Q3

Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 2 of 3.

Q279618/32/O/N/23original Q3Structured · 5 marks
Question 3 from 9618/32/O/N/23

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 IDEAA 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

Mark scheme for 9618/32/O/N/23 question 3
VIDEO
▶ Whole paper

Video solution of the whole paper · by TEACHING BY SM. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.