Lesson T1.2.1
T1.2.1 Sorting algorithms Quiz: KS3 Computing, Unit 1
20 questions
In partnership with Revision Ninja
Lesson T1.2.1, Sorting algorithms: 20 multiple choice questions for the KS3 Computing (National Curriculum), Unit 1: Computational thinking and algorithms, written with Revision Ninja.
Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.
The 20 questions
-
What does a sorting algorithm do?
- Converts every item in a list into binary code for storage
- Counts how many items there are in a list and reports the total
- Puts items into a defined order, such as smallest to largest
- Deletes any duplicate items from a list so each value appears once
-
In bubble sort, where does the largest unsorted value end up after each pass?
- Removed from the list completely
- At the start of the list
- Swapped with the first item every pass
- At the end of the unsorted section
-
Which sorting method repeatedly finds the smallest item and moves it to the front?
- Binary search
- Linear search
- Hash table lookup
- Selection sort
-
A list has 5 items. On its first pass, how many adjacent pairs does bubble sort compare?
- 10
- 4
- 5
- 1
-
The list is [5, 2, 9, 1]. What is the list after one full bubble sort pass?
- [5, 2, 1, 9]
- [9, 5, 2, 1]
- [2, 5, 1, 9]
- [1, 2, 5, 9]
-
Why is insertion sort a good choice for a list that is already nearly sorted?
- It only works on lists that are already fully sorted
- It needs very few moves when most items are already in place
- It needs to compare every item with every other item
- It deletes the items that are out of order
-
Why might a programmer compare different sorting algorithms?
- To see which uses fewer steps or less time on the same task
- To make sure that every algorithm gives a different answer
- To find out which algorithm has the most attractive name
- To avoid writing any code at all for the sorting task
-
The list is [7, 3, 5]. After the first pass of selection sort, what is the list?
- [3, 5, 7]
- [3, 7, 5]
- [5, 3, 7]
- [7, 3, 5]
-
What does 'ascending order' mean?
- From smallest to largest
- Only in alphabetical order
- In a random order
- From largest to smallest
-
A list of names is sorted alphabetically with bubble sort. The list begins with Zoe then Adam. What is the first pair compared?
- Zoe and Adam
- The last two names in the whole list
- Adam and Zoe alone, with no comparison first
- The first name and the last name
-
What is a key feature of bubble sort?
- It repeats passes until a pass makes no swaps
- It only works when every item is a number
- It never changes the order of any items
- It picks numbers at random to decide the order
-
How does insertion sort build its sorted result?
- It counts how many items are larger than each item
- It swaps the first and last items over and over
- It inserts each item into the correct place within a sorted part
- It deletes each item and then adds it back at the end
-
Why does a sorting algorithm need to make comparisons?
- To change the list into a different data type
- To check whether the computer has enough memory
- To decide which of two items should come first
- To count how many times the list has been printed
-
A list of 4 items is sorted by bubble sort. What is the most passes that are needed?
- 1
- 4
- 6
- 3
-
Bubble sort is applied to [3, 1, 2]. How many swaps happen in total?
- 0
- 1
- 3
- 2
-
Selection sort is applied to [6, 4, 8, 2]. What is the list after the first pass?
- [4, 6, 8, 2]
- [2, 6, 8, 4]
- [2, 8, 4, 6]
- [2, 4, 8, 6]
-
A sort is needed for a list of exam scores from lowest to highest. Which order should be used?
- Ascending order
- Random order
- Descending order
- Reverse alphabetical order
-
A programmer wants to sort a long list quickly. Why is bubble sort often a poor choice?
- It cannot sort any list that has more than five items at a time
- It can only sort lists that contain words, so numbers must be converted first
- It makes many comparisons and swaps, so it becomes slow on large lists
- It always changes the values stored in the list, even when they are sorted
-
Which sort works by repeatedly swapping neighbouring items that are out of order?
- Selection sort
- Bubble sort
- Binary search
- Linear search
-
Which of these lists is in ascending order?
- [5, 8, 1, 3]
- [1, 3, 5, 8]
- [8, 5, 3, 1]
- [3, 1, 8, 5]
Related quizzes
- Computational abstractions of real-world systems Quiz · T1.1.1 · 20 questions
- Searching algorithms Quiz · T1.2.2 · 20 questions
- Comparing the utility of algorithms Quiz · T1.2.3 · 20 questions
- Solving problems with two or more programming languages Quiz · T2.1.1 · 20 questions
- AND, OR and NOT Quiz · T3.1.1 · 20 questions
- Hardware and software components Quiz · T4.1.1 · 20 questions
- Combining applications across devices Quiz · T5.1.1 · 20 questions
- Using technology safely, respectfully and responsibly Quiz · T6.1.1 · 20 questions
- Textual programming languages Quiz · T2.1.2 · 20 questions
- Boolean logic in circuits and programming Quiz · T3.1.2 · 20 questions