9618/33/O/N/24 question 5: worked solution (October/November 2024, paper 33)
Show as plain textHide 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. Q33 9618/33/O/N/24 original Q5 Structured · 5 marks Worked solution (a) Write any three of these: A hashing algorithm is used in direct access to find records in a file, and it is a mathematical formula (calculation) [1] The calculation is applied to the key field of the record being stored or searched for [1] The result gives the address where the record is stored or should be found [1] The first line holds two separate points (used in direct access, and a mathematical formula). Each can earn a mark, but the most you can score is 3. (b) Give two methods: Store the record in the next free space after the one the algorithm gave (linear progression) [1] Set up an overflow area and store the record in the next free space there [1] KEY IDEA A hashing algorithm turns the key field into a storage address, and clashes are fixed by using the next free space or an overflow area. TOTAL 5 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by Zafar Ali Khan (ZAK). Tap the picture to open it on YouTube.