Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 2 of 3.
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]
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.
▶ 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.