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.

Host this setFree Play

The 20 questions

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. A list has 10 items. What is the most checks linear search needs?

    • 9
    • 10
    • 5
    • 1
  7. 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
  8. Which search method is quicker on a large sorted list?

    • Neither can find anything
    • Binary search
    • Linear search
    • Both are always equally quick
  9. 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
  10. 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
  11. The list is [8, 3, 6, 1]. Linear search looks for 6. How many items are checked?

    • 3
    • 4
    • 1
    • 2
  12. 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
  13. 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
  14. 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
  15. 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
  16. A sorted list has 1000 items. About how many checks does binary search need at worst?

    • 500
    • 10
    • 100
    • 1000
  17. 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
  18. 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
  19. 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
  20. Linear search looks for 7 in the list [7, 2, 5]. How many items does it check?

    • 3
    • 1
    • 2
    • 0

All KS3 Computing quizzes