Lesson T1.2.2
T1.2.2 Searching algorithms Quiz: KS3 Computing, Unit 1
20 questions
In partnership with Revision Ninja
Lesson T1.2.2, Searching 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 search algorithm do?
- Finds whether an item is in a list and where it is
- Counts how many times each item appears
- Deletes every copy of an item from a list
- Sorts the items into a new order
-
How does linear search work?
- It jumps straight to the middle item and never checks the others in the list
- It checks each item in turn from the start until it finds the target or reaches the end
- It reads the list in random order until it finds the target or gives up
- It halves the list again and again until only one item is left to check
-
What must be true of a list before binary search can be used?
- The list must contain exactly ten items
- The list must already be sorted
- The list must be stored on a hard disk
- The list must contain only numbers
-
Binary search looks for a value in the sorted list [1, 3, 5, 7, 9, 11, 13, 15, 17]. Which item is checked first?
- 1
- 9
- 11
- 7
-
Binary search looks for 13 in [1, 3, 5, 7, 9, 11, 13, 15, 17]. The middle item checked is 9. Which part is searched next?
- The items less than 9
- The whole list again from the start
- The items greater than 9
- Only the first item in the list
-
A list has 10 items. What is the most checks linear search needs?
- 9
- 10
- 5
- 1
-
A list has 16 sorted items. Binary search halves the remaining items at each step. About how many checks are needed at most?
- 16
- 8
- 2
- 4
-
Which search method is quicker on a large sorted list?
- Neither can find anything
- Binary search
- Linear search
- Both are always equally quick
-
A dictionary is sorted alphabetically. Which search is more suitable for finding a word?
- Linear search, because it checks every word in order
- Neither, because a dictionary cannot be searched
- Linear search, because the words are not sorted
- Binary search, because it needs far fewer checks
-
Why is linear search still useful?
- It is faster than binary search on all sorted lists
- It needs the list to be sorted before it starts
- It never needs to compare any items
- It works on lists that are not sorted
-
The list is [8, 3, 6, 1]. Linear search looks for 6. How many items are checked?
- 3
- 4
- 1
- 2
-
Linear search looks for 10 in [4, 7, 2, 9]. What is the result?
- Found at position 2
- Found at position 1
- Not found
- Found at position 4
-
Binary search looks for 5 in the sorted list [2, 4, 6, 8]. What is the result?
- Not found
- Found at position 3
- Found at position 2
- Found at position 4
-
What is the main drawback of binary search?
- It needs a separate computer for each item
- The list must be sorted before the search starts
- It checks every item in the list one at a time
- It can only search lists that contain exactly eight items
-
A list of 100 unsorted names will be searched many times. What is the best first step?
- Print the names and search them by eye
- Sort the list once, then use binary search each time
- Search the list with linear search every time, without sorting
- Delete half of the names before searching
-
A sorted list has 1000 items. About how many checks does binary search need at worst?
- 500
- 10
- 100
- 1000
-
What is the index of an item in a list?
- The value that is stored in the item
- The name of the list the item belongs to
- The number of times the item appears in the list
- Its position number within the list
-
A search checks the middle item and finds it is smaller than the target. Where should the search look next?
- In the upper half, with the larger items
- Nowhere, because the search must stop
- In the lower half, with the smaller items
- At the start of the whole list again
-
Which situation makes linear search the most sensible choice?
- A list that must always be checked from the middle first
- A short unsorted list that is searched only once
- A very long sorted list that is searched thousands of times
- A sorted list of a million numbers
-
Linear search looks for 7 in the list [7, 2, 5]. How many items does it check?
- 3
- 1
- 2
- 0
Related quizzes
- Computational abstractions of real-world systems Quiz · T1.1.1 · 20 questions
- Sorting algorithms Quiz · T1.2.1 · 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