Lesson 4.3.4.3

4.3.4.3 Binary tree search Quiz: AQA Computer Science, Unit 3

20 questions

In partnership with Revision Ninja

Lesson 4.3.4.3, Binary tree search: 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.

Host this setFree Play

The 20 questions

  1. What is the average time complexity of a binary tree search algorithm?

    • O(n)
    • O(1)
    • O(n^2)
    • O(log n)
  2. In a binary search tree, where are values smaller than a node stored?

    • Root node
    • Left subtree
    • Parent node
    • Right subtree
  3. What is the maximum number of child nodes any node in a binary tree can have?

    • Two
    • One
    • Three
    • Unlimited
  4. When searching a binary search tree, which path is taken if the target value exceeds the node?

    • Parent node
    • Root node
    • Left subtree
    • Right subtree
  5. What is the primary advantage of balanced binary tree search over linear search?

    • Constant time
    • Fewer comparisons
    • Lower memory usage
    • Simpler code
  6. A binary search tree is built by inserting 50, 30, 70, 20, 40, 60 and 80 in that order. How many comparisons are needed to find 60?

    • 2
    • 4
    • 3
    • 1
  7. In the same tree (50, 30, 70, 20, 40, 60, 80), how many comparisons are made searching for 35, which is not present?

    • 2
    • 4
    • 7
    • 3
  8. How many levels does the tree built from 50, 30, 70, 20, 40, 60 and 80 have, counting the root as level 1?

    • 4
    • 7
    • 2
    • 3
  9. Inserting elements in strictly ascending order into an unbalanced binary search tree produces what structure?

    • A cyclic graph
    • A linear chain
    • A balanced tree
    • A complete graph
  10. What is the height of a degenerate binary tree containing n nodes?

    • 1
    • log n
    • n
    • n^2
  11. A balanced binary search tree holds 1000 values. Approximately how many comparisons does a search need?

    • 1000
    • 10
    • 500
    • 100
  12. A partial binary search tree has root 50, a right child 70 whose left child is 60. How many comparisons are needed to conclude that 65 is absent?

    • 4
    • 2
    • 5
    • 3
  13. In a binary search tree built from 5, 3, 8, 1 and 4, what is the left child of 3?

    • 1
    • 8
    • 4
    • 5
  14. In the binary search tree built from 5, 3, 8, 1 and 4, how many comparisons are needed to find 4?

    • 4
    • 1
    • 3
    • 2
  15. A perfectly balanced binary search tree has n nodes. Which expression gives its approximate height?

    • n
    • n squared
    • log2(n)
    • n / 2
  16. What is the worst-case time complexity of searching an unbalanced binary tree?

    • O(n)
    • O(n^2)
    • O(1)
    • O(log n)
  17. What operational advantage does a binary search tree have over a sorted array?

    • Faster random access
    • Efficient insertion
    • Simpler traversal
    • Less memory used
  18. A binary search tree is built by inserting 8, 3, 10, 1, 6, 14, 4, 7 and 13 in that order. How many comparisons are needed to find 7?

    • 5
    • 3
    • 4
    • 2
  19. For the tree built from 8, 3, 10, 1, 6, 14, 4, 7 and 13, what is the in-order output?

    • 1, 3, 4, 6, 7, 8, 10, 13, 14
    • 8, 3, 1, 6, 4, 7, 10, 14, 13
    • 14, 13, 10, 8, 7, 6, 4, 3, 1
    • 1, 4, 3, 7, 6, 13, 14, 10, 8
  20. What happens to search efficiency when a binary tree degenerates into a single chain?

    • It becomes O(1)
    • It becomes O(n)
    • It remains O(log n)
    • It becomes O(n^2)

All AQA Computer Science quizzes