What is the size of a binary tree with only a root node?
1
0
2
Undefined
If a binary tree is considered balanced, what does it imply about its left and right subtrees?
They have the same number of nodes.
They have the same height.
One subtree is always a mirror image of the other.
They are also balanced binary trees, and their heights differ by at most 1.
The height of a binary tree with 'n' nodes is always:
log2(n)
Cannot be determined from the number of nodes
floor(log2(n)) + 1
n/2
The path from the root to any node in a binary tree is always:
Unique
Circular
Disconnected
Non-unique
What is the maximum number of nodes at level 'l' of a complete binary tree?
l
2^(l+1) - 1
2l - 1
2^l
What is the primary advantage of using a BST over a sorted array for storing data when frequent insertions and deletions are required?
BSTs offer faster search times.
BSTs are easier to implement.
BSTs use less memory.
BSTs handle insertions and deletions more efficiently.
What are the three main methods for traversing a binary tree?
Linear, Binary, Exponential
Breadth-first, Depth-first, Level-order
Ascending, Descending, Random
Preorder, Inorder, Postorder
What is one way to check the validity of a BST during insertion or deletion operations?
Maintaining a separate sorted array to compare with the BST
Performing a full tree traversal after every operation
Checking the BST property locally during the insertion or deletion process
It's not possible to ensure validity during the operations themselves.
Which of the following is a valid approach for deleting a node with two children in a binary tree?
Swap the node with its parent
Simply remove the node
Replace the node with its inorder successor
None of the above
What is the time complexity of finding the minimum value in a BST?
O(log n)
O(n)
O(1)
It depends on the balancing of the tree.