Recall & Review
beginner
What is a Binary Search Tree (BST)?
A BST is a special type of binary tree where each node's left child has a smaller value, and the right child has a larger value than the node itself.
Click to reveal answer
beginner
Why is searching faster in a BST compared to a plain binary tree?
Because BST keeps nodes in order, it allows skipping half of the tree at each step, making search faster than checking every node in a plain binary tree.
Click to reveal answer
intermediate
What is the average time complexity of search in a BST?
The average time complexity is O(log n), where n is the number of nodes, because the tree is divided roughly in half at each step.
Click to reveal answer
beginner
What is a major drawback of a plain binary tree for searching?
A plain binary tree has no order, so searching may require checking every node, resulting in O(n) time complexity.
Click to reveal answer
intermediate
How does the structure of a BST help with insertion and deletion?
BST structure keeps data ordered, so insertion and deletion can be done efficiently by following the tree's order rules, usually in O(log n) time.
Click to reveal answer
What property distinguishes a BST from a plain binary tree?
✗ Incorrect
BSTs keep nodes ordered so left child is smaller and right child is larger.
What is the worst-case time complexity for searching in a plain binary tree?
✗ Incorrect
Without order, searching may require checking all nodes, which is O(n).
Why is searching in a BST usually faster than in a plain binary tree?
✗ Incorrect
BSTs keep data ordered, so search can skip large parts of the tree.
Which operation benefits from the BST property?
✗ Incorrect
BST property helps searching, insertion, and deletion by keeping data ordered.
What happens if a BST becomes unbalanced?
✗ Incorrect
An unbalanced BST can behave like a linked list, making search O(n).
Explain why a Binary Search Tree is preferred over a plain binary tree for searching data.
Think about how order helps find data faster.
You got /4 concepts.
Describe how the structure of a BST affects insertion and deletion operations compared to a plain binary tree.
Consider how order guides where to add or remove nodes.
You got /4 concepts.