Recall & Review
beginner
What is the minimum element in a Binary Search Tree (BST)?
The minimum element in a BST is the leftmost node because all smaller values are stored to the left.
Click to reveal answer
beginner
How do you find the minimum element in a BST?
Start at the root and keep moving to the left child until you reach a node with no left child. That node is the minimum.
Click to reveal answer
beginner
Why does moving left in a BST lead to the minimum element?
Because in a BST, left children are always smaller than their parent nodes, so the leftmost node holds the smallest value.
Click to reveal answer
intermediate
What is the time complexity to find the minimum element in a BST?
The time complexity is O(h), where h is the height of the BST. In the worst case (skewed tree), it can be O(n).
Click to reveal answer
beginner
Show the C++ code snippet to find the minimum element in a BST.
Node* findMin(Node* root) {
while (root && root->left) {
root = root->left;
}
return root;
}
Click to reveal answer
In a BST, where is the minimum element located?
✗ Incorrect
The minimum element is always the leftmost node in a BST.
What is the first step to find the minimum element in a BST?
✗ Incorrect
You start at the root and move left repeatedly to find the minimum.
If a BST has only one node, what is the minimum element?
✗ Incorrect
With one node, the root itself is the minimum.
What is the time complexity to find the minimum element in a balanced BST?
✗ Incorrect
In a balanced BST, height h is about log n, so finding minimum is O(log n).
Which of these is a correct way to find the minimum element in a BST?
✗ Incorrect
Moving left until no left child is the correct method.
Explain how to find the minimum element in a Binary Search Tree and why this method works.
Think about the BST rule for left children.
You got /5 concepts.
Write a simple C++ function to find the minimum element in a BST and describe its time complexity.
Focus on traversal and height of tree.
You got /5 concepts.