Computational Thinking Searching and Sorting Algorithms VythqRmDYxPxsQt9
Computational Thinking Searching and Sorting Algorithms VythqRmDYxPxsQt9
Computational
Thinking, Searching &
Sorting Algorithms
Principles of Computational Thinking / Standard Searching Algorithms / Standard
Sorting Algorithms
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 1
Easy Questions
1 State the name of each of the following computational thinking techniques.
(2 marks)
2 The following table contains several definitions of terms that are used in Computer
Science.
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 2
Letter Definition
Write the letter of the definition that matches each keyword in each space.
Keyword Letter
Decomposition
Abstraction
Input sanitisation
Casting
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 3
(4 marks)
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 4
3 (a) A list of valid discount codes is shown below.
State one reason why a binary search would not be able to be used with this data.
(1 mark)
(b) Give the name of one searching algorithm that would be able to be used with this
data.
(1 mark)
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 5
Medium Questions
1 (a) A program stores the following list of positive and negative numbers. The numbers need
sorting into ascending order using a merge sort.
The first step is to divide the list into individual lists of one number each. This has been
done for you.
Complete the merge sort of the data by showing each step of the process.
(3 marks)
(b) Once the numbers are in order, a binary search can be run on the data.
Describe the steps a binary search will follow to look for a number in a sorted list.
(4 marks)
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 6
(c) A linear search could be used instead of a binary search.
Describe the steps a linear search would follow when searching for a number that is
not in the given list.
(2 marks)
Fig. 4
Show the stages of a binary search to find the word zebra using the data shown in Fig.
4.
(4 marks)
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 7
3 (a) Tick (✓) one box in each row to identify whether each statement about the insertion
sort is true or false.
The insertion sort uses a divide stage and then a conquer stage.
The list of words must be in order before the insertion sort can
start.
Each word is inserted into the correct place in the array, one by
one.
The insertion sort will not work because the word “wall” appears
twice.
(5 marks)
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 8
Explain how a binary search would be used to try to find whether the word “house”
appears in this list.
(4 marks)
Give two computational thinking techniques that Taylor could have used, describing
how they could have been used.
(4 marks)
5 The following names of students are stored in an array with the identifier
studentnames.
Describe the steps that a linear search would take to find Anna in studentnames
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 9
(4 marks)
6 The names of students are sorted into ascending alphabetical order using an
insertion sort.
Complete the following diagram to show the stages an insertion sort would take to
complete this task.
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 10
(5 marks)
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 11
7 (a) Elliott plays football for OCR FC.
He wants to create a program to store the results of each football match they play
and the names of the goal scorers.
Elliott wants individual players from the team to be able to submit this information.
(2 marks)
(b) Give one example of how abstraction could be used when developing this program in
part (a).
(1 mark)
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 12
8 (a) A library sorts their books based on a book code.
Show the steps that a merge sort would take to put the following list of book codes into
ascending alphabetical order (from A to Z).
(4 marks)
(2 marks)
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 13
Hard Questions
1 A program uses a file to store a list of words that can be used in a game.
Fig. 3
Show the stages of a bubble sort when applied to data shown in Fig. 3.
(4 marks)
2 An insertion sort algorithm is used to sort a dataset of game scores from smallest to
largest
Describe the purpose of the count-controlled loop and give an example of what the
loop would look like.
Purpose
Example
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 14
(3 marks)
3 Describe the steps involved in performing a bubble sort on the list in Fig. 1. Show the
state of the list after each complete pass through the list.
12 34 45 23 8 39
Fig. 1
(5 marks)
© 2025 Save My Exams, Ltd. Get more and ace your exams at savemyexams.com 15