Lesson 4.3.5.2
4.3.5.2 Merge sort Quiz: AQA Computer Science, Unit 3
20 questions
In partnership with Revision Ninja
Lesson 4.3.5.2, Merge 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 merge sort?
- O(n log n)
- O(log n)
- O(n log n squared)
- O(n^2)
-
Merge sort is an example of which approach to problem solving?
- Dynamic programming only
- Greedy
- Brute force
- Divide and conquer
-
What does merge sort do first with a list?
- Scans the list for duplicate values
- Divides the list into smaller halves until each part holds a single item
- Creates a binary tree of comparisons between every pair of items in the list
- Finds the largest item
-
In the merge step of merge sort, what happens?
- Items are swapped until the list is reversed
- Two lists are joined end to end without comparison
- The largest item is removed from each list
- Two sorted lists are combined by repeatedly taking the smaller front item
-
Why is merge sort O(n log n) while bubble sort is O(n^2)?
- Merge sort compares each item only once overall, so it runs in linear time for every list
- Merge sort never swaps items
- Merge sort halves the list about log n times, and each level of merging costs O(n)
- Merge sort uses a fixed number of passes
-
What extra storage does merge sort typically need during merging?
- Auxiliary space proportional to n
- No extra storage
- A single constant variable
- Space proportional to n squared
-
Merge two sorted lists [1, 4, 7] and [2, 3, 8]. What is the result?
- [1, 2, 3, 4, 8, 7]
- [1, 2, 3, 4, 7, 8]
- [2, 3, 1, 4, 7, 8]
- [1, 4, 7, 2, 3, 8]
-
How many times can an 8-item list be halved before single items remain?
- 8
- 4
- 2
- 3
-
What is the sorted output of merge sort applied to [38, 27, 43, 3]?
- [3, 38, 27, 43]
- [38, 27, 3, 43]
- [27, 3, 38, 43]
- [3, 27, 38, 43]
-
Merging the sorted lists [2, 6, 9] and [1, 5] with the standard merge step, what is the first item output?
- 2
- 1
- 9
- 5
-
What is the maximum number of comparisons needed to merge two sorted lists of lengths 4 and 4?
- 8
- 16
- 4
- 7
-
How many halving levels does merge sort use for 1024 items?
- 1024
- 512
- 10
- 5
-
Roughly how many operations does merge sort need for n = 1024 items?
- 1048576
- 10240
- 1024
- 523776
-
Compared with bubble sort on the same 1024 items, merge sort needs roughly how many times fewer operations?
- About 2 times
- About 10 times
- About 50 times
- About 1000 times
-
Why is the merge step stable when ties are resolved in favour of the left list?
- The sort becomes O(n^2)
- Equal items keep their original relative order
- Equal items are removed from the result
- Items are reversed during the merge
-
What is the recursion depth of merge sort on n items?
- n levels
- Exactly two levels
- n squared levels
- About log2 n levels
-
Roughly how many comparisons does merge sort need to sort 1000 items?
- About 1,000,000
- About 1,000
- About 10,000
- About 100,000
-
Which is a valid reason to prefer merge sort over bubble sort for large data sets?
- Merge sort never needs any comparisons
- Bubble sort cannot run on modern computers
- Merge sort uses less memory than any algorithm
- Its O(n log n) growth keeps running time manageable as n increases
-
A merge sort sorts 16 items. How many merge operations occur in total?
- 16
- 8
- 15
- 4
-
What is the running time of merge sort on a list that is already sorted?
- O(1)
- O(n^2)
- O(n), because it stops early
- O(n log n), because it still divides and merges
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
- Bubble sort Quiz · 4.3.5.1 · 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