Lesson 2.1.3
2.1.3 Searching and sorting algorithms Quiz: OCR Computer Science, Unit 7
20 questions
In partnership with Revision Ninja
Lesson 2.1.3, Searching and sorting algorithms: 20 multiple choice questions for the OCR GCSE Computer Science (J277), Unit 7: 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 must be true about a list before performing a binary search?
- It contains numbers
- It is empty
- It is sorted
- It is randomised
-
Which search algorithm checks each item in turn until the target is found?
- Linear search
- Merge search
- Binary search
- Bubble search
-
How does binary search narrow down the search space on each comparison?
- Discards one item
- Discards a quarter
- Reverses the list
- Discards half
-
Which sorting algorithm repeatedly compares adjacent items and swaps them if out of order?
- Binary sort
- Bubble sort
- Insertion sort
- Merge sort
-
Which sorting algorithm splits a list into halves and combines them back in order?
- Bubble sort
- Merge sort
- Insertion sort
- Linear sort
-
Which sorting algorithm builds a sorted section by placing each new item into position?
- Insertion sort
- Binary sort
- Merge sort
- Bubble sort
-
After one complete pass of a bubble sort, which item is guaranteed to be in its final position?
- Smallest item
- Median item
- First item
- Largest item
-
Which search algorithm can be used successfully on an unsorted list?
- Hash search
- Linear search
- Binary search
- Indexed search
-
A list is 2, 5, 8, 12, 16, 23, 38, 56, 72, 91. How many comparisons does a binary search need to find 23?
- 3
- 10
- 2
- 5
-
Using the same list 2, 5, 8, 12, 16, 23, 38, 56, 72, 91, how many comparisons does a linear search need to find 72?
- 7
- 8
- 10
- 9
-
What is the list after one pass of bubble sort on 5, 3, 8, 1?
- 5, 3, 1, 8
- 1, 3, 5, 8
- 3, 5, 1, 8
- 3, 5, 8, 1
-
The sorted section is 4. The next item, 2, is inserted into the correct place. What is the sorted section now?
- 4, 2
- 2
- 2, 4
- 4
-
Splitting 6, 2, 9, 4 gives 6, 2 and 9, 4. Each part is sorted to give 2, 6 and 4, 9. What does merging them give?
- 6, 2, 9, 4
- 2, 6, 4, 9
- 2, 4, 6, 9
- 4, 2, 6, 9
-
A programmer needs to find a name in an alphabetically sorted directory, and speed matters. Which algorithm is best?
- Linear search
- Bubble sort
- Binary search
- Insertion sort
-
Which search type is most efficient for a single lookup in a large unsorted list?
- Linear search
- Bubble search
- Merge search
- Binary search
-
A loop repeatedly compares each pair of neighbouring items, swaps them if out of order, and makes passes until no swaps occur. Which algorithm is this?
- Bubble sort
- Linear search
- Merge sort
- Binary search
-
Why is binary search faster than linear search on large ordered datasets?
- Halves the data
- Skips random items
- Uses parallel processing
- Removes duplicates
-
Why is merge sort generally more efficient than bubble sort on large lists?
- Fewer comparisons
- More memory
- Simpler code
- Faster hardware
-
Why is an insertion sort very efficient when used on a nearly sorted list?
- Lists split equally
- Pivots are central
- Few items move
- No items move
-
After several passes of bubble sort, what does an unsorted list suggest?
- List is sorted
- Algorithm failed
- Memory is full
- More passes needed
Related quizzes
- Computational thinking Quiz · 2.1.1 · 20 questions
- Designing, creating and refining algorithms Quiz · 2.1.2 · 20 questions
- Architecture of the CPU Quiz · 1.1.1 · 20 questions
- Primary storage (memory) Quiz · 1.2.1 · 20 questions
- Networks and topologies Quiz · 1.3.1 · 20 questions
- Threats to computer systems and networks Quiz · 1.4.1 · 20 questions
- Operating systems Quiz · 1.5.1 · 20 questions
- Ethical, legal, cultural and environmental impact Quiz · 1.6.1 · 20 questions
- Programming fundamentals Quiz · 2.2.1 · 20 questions
- Defensive design Quiz · 2.3.1 · 20 questions