Lesson 4.3.5.1
4.3.5.1 Bubble sort Quiz: AQA Computer Science, Unit 3
20 questions
In partnership with Revision Ninja
Lesson 4.3.5.1, Bubble sort: 20 multiple choice questions for the AQA Computer Science (7517), Unit 3: Fundamentals of 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 is the time complexity of bubble sort?
- O(n log n)
- O(n)
- O(n^2)
- O(log n)
-
In bubble sort, what happens to adjacent items that are out of order?
- They are swapped
- They are merged
- They are ignored
- They are deleted
-
After one complete pass of bubble sort, what is guaranteed?
- The list is fully sorted
- The smallest item is at the front
- The list is reversed
- The largest item has reached its final position at the end
-
Why does the specification describe bubble sort as an inefficient sorting algorithm?
- It cannot sort numbers
- It uses too much memory
- It is time-inefficient, with O(n^2) growth in comparisons
- It requires a tree structure
-
How does bubble sort work?
- It inserts each item into a binary tree
- It splits the list in half and merges sorted halves
- It selects the middle item and partitions around it
- It repeatedly compares adjacent pairs and swaps those that are out of order
-
Which sorting algorithm is included in the specification as a particularly inefficient example?
- Binary tree sort
- Merge sort
- Dijkstra sort
- Bubble sort
-
Bubble sort is applied to [5, 1, 4, 2, 8]. What is the list after the first pass?
- [1, 5, 4, 2, 8]
- [1, 2, 4, 5, 8]
- [1, 4, 2, 5, 8]
- [5, 1, 4, 2, 8]
-
Bubble sort is applied to [5, 1, 4, 2, 8]. What is the list after two passes?
- [1, 2, 4, 5, 8]
- [2, 1, 4, 5, 8]
- [1, 4, 2, 5, 8]
- [1, 2, 4, 8, 5]
-
How many swaps does bubble sort perform in total while sorting [5, 1, 4, 2, 8]?
- 4
- 3
- 5
- 2
-
How many comparisons are made in the first pass of bubble sort on a list of 10 items?
- 8
- 9
- 45
- 10
-
How many comparisons does a complete bubble sort of n items make without an early-exit check?
- n + 1
- log2 n
- 2n
- n(n - 1) / 2
-
With an early-exit check that stops when a pass makes no swaps, how many passes are needed to confirm an already sorted list of 10 items?
- 10
- 1
- 9
- 2
-
If the number of items in a bubble sort doubles, roughly how does the running time change?
- It doubles
- It increases by a fixed amount
- It roughly quadruples
- It is unchanged
-
How many swaps does bubble sort need to sort the reverse-ordered list [4, 3, 2, 1]?
- 3
- 10
- 6
- 4
-
For a list of 100 distinct items in reverse order, how many swaps does bubble sort perform?
- 4950
- 99
- 100
- 9900
-
Which statement best explains why bubble sort is a poor choice for a list of one million items?
- It requires the list to be stored as a tree
- It uses too much memory
- It cannot sort numbers
- Its roughly n^2 comparisons grow far faster than n log n, making run time impractical
-
When bubble sort compares two equal adjacent values, what should it do to keep the sort stable?
- Leave them in place
- Compare them with a third value
- Swap them so their order is reversed
- Delete one of them
-
Bubble sort is applied to [3, 7, 2]. What is the list after the first pass?
- [2, 3, 7]
- [3, 7, 2]
- [3, 2, 7]
- [7, 3, 2]
-
Roughly how many comparisons does a worst-case bubble sort of 1024 items make?
- 1,048,576
- 523,776
- 10,240
- 1,023
-
A bubble sort is applied to a list that is already sorted, without the early-exit optimisation. How many swaps occur?
- 0
- n - 1
- 1
- n(n - 1) / 2
Related quizzes
- Breadth-first and depth-first search Quiz · 4.3.1.1 · 20 questions
- Pre-order, post-order and in-order traversal Quiz · 4.3.2.1 · 20 questions
- Infix to Reverse Polish notation Quiz · 4.3.3.1 · 20 questions
- Linear and binary search Quiz · 4.3.4.1 · 20 questions
- Binary tree search Quiz · 4.3.4.3 · 20 questions
- Merge sort Quiz · 4.3.5.2 · 20 questions
- Dijkstra's shortest path algorithm Quiz · 4.3.6.1 · 20 questions
- Data types Quiz · 4.1.1.1 · 20 questions
- Entity relationship modelling Quiz · 4.10.1.1 · 20 questions
- Big Data Quiz · 4.11.1.1 · 20 questions