Question Paper & Mark Scheme (Merged)
Wednesday 11 June 2025 [VERIFIED]
, 2
Section A
You are advised to spend no longer than 40 minutes on this section.
Enter your answers for Section A in your Electronic Answer Document.
You must save this document at regular intervals.
0 1 Two data structures that can be used to store a collection of data records are a hash
table and a sorted list.
0 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]
0 1 . 2 Describe the steps involved in adding a new record to a hash table.
[4 marks]
0 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.
0 1 . 4 Explain why the linear search algorithm has time complexity of O(n).
[1 mark]
0 1 . 5 Explain why the binary search algorithm has time complexity of O(log n).
[1 mark]
0 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.
for more: tyrionpapers.com
IB/G/Jun25/7517/1
, 3
0 1 . 7 Explain why both these sorting algorithms are tractable.
[1 mark]
0 1 . 8 After how many passes is bubble sort guaranteed to have sorted any list of
100 items?
[1 mark]
for more: tyrionTpu
aprenrs.o
covmer ►
IB/G/Jun25/7517/1
, 4
0 2 Define the term decomposition.
[2 marks]
Dijkstra’s algorithm is an example of a breadth-first traversal algorithm.
0 3 . 1 State the purpose of Dijkstra’s algorithm.
[1 mark]
Figure 1 shows a graph containing seven nodes.
Figure 1
0 3 . 2 State both the reasons why the graph in Figure 1 is not a tree.
[2 marks]
0 3 . Complete the unshaded cells in Table 1 to show how the graph in Figure 1 could be
3
represented as an adjacency matrix.
Table 1
1 2 3 4 5 6 7
1
2
3
4
5
6
7
for more: tyrionpapers.com
IB/G/Jun25/7517/1