Question 1
AQA Computer Science June 2025 Paper 1 (7517/1)A level11 marks
On the specification
- 1.1
- 4.2 Fundamentals of data structures
- 1.2
- 4.2 Fundamentals of data structures
- 1.3
- 4.2 Fundamentals of data structures
- 1.4
- 4.3 Fundamentals of algorithms4.4 Theory of computation
- 1.5
- 4.3 Fundamentals of algorithms4.4 Theory of computation
- 1.6
- 4.3 Fundamentals of algorithms
- 1.7
- 4.4 Theory of computation4.3 Fundamentals of algorithms
- 1.8
- 4.3 Fundamentals of algorithms
Question text
1 Two data structures that can be used to store a collection of data records are a hash table and a sorted list. 1.1 Explain why a record in a hash table can normally be found more quickly than a record in a sorted list. [1 mark] 1.2 Describe the steps involved in adding a new record to a hash table. [4 marks] 1.3 Explain why the time taken to find a specific record in a hash table can increase when lots of records are stored in the table. [1 mark] Linear search and binary search are two algorithms that could be used to find a record in a sorted list. 1.4 Explain why the linear search algorithm has time complexity of O(n). [1 mark] 1.5 Explain why the binary search algorithm has time complexity of O(log n). [1 mark] 1.6 State one advantage of a linear search compared to a binary search. [1 mark] If the list of records was unsorted, a bubble sort algorithm or a merge sort algorithm could be used to sort the records. 1.7 Explain why both these sorting algorithms are tractable. [1 mark] 1.8 After how many passes is bubble sort guaranteed to have sorted any list of 100 items? [1 mark]