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.
The 20 questions
-
What is the average time complexity of a binary tree search algorithm?
- O(n)
- O(1)
- O(n^2)
- O(log n)
-
In a binary search tree, where are values smaller than a node stored?
- Root node
- Left subtree
- Parent node
- Right subtree
-
What is the maximum number of child nodes any node in a binary tree can have?
- Two
- One
- Three
- Unlimited
-
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
-
What is the primary advantage of balanced binary tree search over linear search?
- Constant time
- Fewer comparisons
- Lower memory usage
- Simpler code
-
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
-
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
-
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
-
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
-
What is the height of a degenerate binary tree containing n nodes?
- 1
- log n
- n
- n^2
-
A balanced binary search tree holds 1000 values. Approximately how many comparisons does a search need?
- 1000
- 10
- 500
- 100
-
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
-
In a binary search tree built from 5, 3, 8, 1 and 4, what is the left child of 3?
- 1
- 8
- 4
- 5
-
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
-
A perfectly balanced binary search tree has n nodes. Which expression gives its approximate height?
- n
- n squared
- log2(n)
- n / 2
-
What is the worst-case time complexity of searching an unbalanced binary tree?
- O(n)
- O(n^2)
- O(1)
- O(log n)
-
What operational advantage does a binary search tree have over a sorted array?
- Faster random access
- Efficient insertion
- Simpler traversal
- Less memory used
-
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
-
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
-
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)
Related quizzes
- Breadth-first and depth-first search Quiz · 4.3.1.1 · 20 questions
- Pre-order, post-order and in-order traversal Quiz · 4.3.2.1 · 20 questions
- Infix to Reverse Polish notation Quiz · 4.3.3.1 · 20 questions
- Linear and binary search Quiz · 4.3.4.1 · 20 questions
- Bubble sort Quiz · 4.3.5.1 · 20 questions
- Merge sort Quiz · 4.3.5.2 · 20 questions
- Dijkstra's shortest path algorithm Quiz · 4.3.6.1 · 20 questions
- Data types Quiz · 4.1.1.1 · 20 questions
- Entity relationship modelling Quiz · 4.10.1.1 · 20 questions
- Big Data Quiz · 4.11.1.1 · 20 questions