Lesson T1.2.1

T1.2.1 Sorting algorithms Quiz: KS3 Computing, Unit 1

20 questions

In partnership with Revision Ninja

Lesson T1.2.1, Sorting 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 sorting algorithm do?

    • Converts every item in a list into binary code for storage
    • Counts how many items there are in a list and reports the total
    • Puts items into a defined order, such as smallest to largest
    • Deletes any duplicate items from a list so each value appears once
  2. In bubble sort, where does the largest unsorted value end up after each pass?

    • Removed from the list completely
    • At the start of the list
    • Swapped with the first item every pass
    • At the end of the unsorted section
  3. Which sorting method repeatedly finds the smallest item and moves it to the front?

    • Binary search
    • Linear search
    • Hash table lookup
    • Selection sort
  4. A list has 5 items. On its first pass, how many adjacent pairs does bubble sort compare?

    • 10
    • 4
    • 5
    • 1
  5. The list is [5, 2, 9, 1]. What is the list after one full bubble sort pass?

    • [5, 2, 1, 9]
    • [9, 5, 2, 1]
    • [2, 5, 1, 9]
    • [1, 2, 5, 9]
  6. Why is insertion sort a good choice for a list that is already nearly sorted?

    • It only works on lists that are already fully sorted
    • It needs very few moves when most items are already in place
    • It needs to compare every item with every other item
    • It deletes the items that are out of order
  7. Why might a programmer compare different sorting algorithms?

    • To see which uses fewer steps or less time on the same task
    • To make sure that every algorithm gives a different answer
    • To find out which algorithm has the most attractive name
    • To avoid writing any code at all for the sorting task
  8. The list is [7, 3, 5]. After the first pass of selection sort, what is the list?

    • [3, 5, 7]
    • [3, 7, 5]
    • [5, 3, 7]
    • [7, 3, 5]
  9. What does 'ascending order' mean?

    • From smallest to largest
    • Only in alphabetical order
    • In a random order
    • From largest to smallest
  10. A list of names is sorted alphabetically with bubble sort. The list begins with Zoe then Adam. What is the first pair compared?

    • Zoe and Adam
    • The last two names in the whole list
    • Adam and Zoe alone, with no comparison first
    • The first name and the last name
  11. What is a key feature of bubble sort?

    • It repeats passes until a pass makes no swaps
    • It only works when every item is a number
    • It never changes the order of any items
    • It picks numbers at random to decide the order
  12. How does insertion sort build its sorted result?

    • It counts how many items are larger than each item
    • It swaps the first and last items over and over
    • It inserts each item into the correct place within a sorted part
    • It deletes each item and then adds it back at the end
  13. Why does a sorting algorithm need to make comparisons?

    • To change the list into a different data type
    • To check whether the computer has enough memory
    • To decide which of two items should come first
    • To count how many times the list has been printed
  14. A list of 4 items is sorted by bubble sort. What is the most passes that are needed?

    • 1
    • 4
    • 6
    • 3
  15. Bubble sort is applied to [3, 1, 2]. How many swaps happen in total?

    • 0
    • 1
    • 3
    • 2
  16. Selection sort is applied to [6, 4, 8, 2]. What is the list after the first pass?

    • [4, 6, 8, 2]
    • [2, 6, 8, 4]
    • [2, 8, 4, 6]
    • [2, 4, 8, 6]
  17. A sort is needed for a list of exam scores from lowest to highest. Which order should be used?

    • Ascending order
    • Random order
    • Descending order
    • Reverse alphabetical order
  18. A programmer wants to sort a long list quickly. Why is bubble sort often a poor choice?

    • It cannot sort any list that has more than five items at a time
    • It can only sort lists that contain words, so numbers must be converted first
    • It makes many comparisons and swaps, so it becomes slow on large lists
    • It always changes the values stored in the list, even when they are sorted
  19. Which sort works by repeatedly swapping neighbouring items that are out of order?

    • Selection sort
    • Bubble sort
    • Binary search
    • Linear search
  20. Which of these lists is in ascending order?

    • [5, 8, 1, 3]
    • [1, 3, 5, 8]
    • [8, 5, 3, 1]
    • [3, 1, 8, 5]

All KS3 Computing quizzes