Recall & Review
beginner
What is the main difference between a Binary Search Tree (BST) and a plain Binary Tree?
A BST keeps its nodes in a sorted order where left child nodes are smaller and right child nodes are larger than the parent node, while a plain Binary Tree has no such order.
Click to reveal answer
beginner
Why is searching faster in a BST compared to a plain Binary Tree?
Because BST nodes are sorted, you can decide to go left or right at each step, cutting the search space in half, unlike a plain Binary Tree where you may need to check every node.
Click to reveal answer
intermediate
How does the structure of a BST help in insertion and deletion operations?
Insertion and deletion in a BST maintain the sorted order, allowing these operations to be done efficiently by following the tree structure, unlike in a plain Binary Tree where no order is maintained.
Click to reveal answer
intermediate
What is the average time complexity for search, insert, and delete operations in a balanced BST?
The average time complexity is O(log n) for search, insert, and delete because the tree height is kept low, allowing quick traversal.
Click to reveal answer
beginner
Can a plain Binary Tree guarantee O(log n) search time? Why or why not?
No, a plain Binary Tree cannot guarantee O(log n) search time because it does not maintain any order, so you might have to check every node, leading to O(n) time in the worst case.
Click to reveal answer
What property does a Binary Search Tree maintain that a plain Binary Tree does not?
✗ Incorrect
A BST keeps nodes sorted so that left child is smaller and right child is larger than the parent.
Why is searching in a BST generally faster than in a plain Binary Tree?
✗ Incorrect
BST allows binary search by comparing values and choosing left or right subtree.
What is the worst-case time complexity of searching in a plain Binary Tree?
✗ Incorrect
Without order, you may need to check all nodes, leading to O(n) time.
Which operation benefits from the BST property of sorted nodes?
✗ Incorrect
Insertion, deletion, and searching all use the sorted property to be efficient.
If a BST is unbalanced and looks like a linked list, what happens to the search time?
✗ Incorrect
An unbalanced BST can degrade to 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 you find things faster.
You got /5 concepts.
Describe how insertion works differently in a BST compared to a plain Binary Tree.
Insertion in BST follows rules to keep order.
You got /4 concepts.