When deleting a node with two children in a BST, which node is typically chosen as its replacement to maintain the BST properties?
The node with the largest key in the left subtree
Either of the above options can be used
The node with the smallest key in the right subtree
A new node with the average key of its children
What is the primary advantage of using a BST over a sorted array for storing data when frequent insertions and deletions are required?
BSTs are easier to implement.
BSTs offer faster search times.
BSTs handle insertions and deletions more efficiently.
BSTs use less memory.
The height of a binary tree with 'n' nodes is always:
n/2
floor(log2(n)) + 1
log2(n)
Cannot be determined from the number of nodes
Nodes that share the same parent are called:
Ancestors
Cousins
Descendants
Siblings
What is the maximum possible height of a balanced binary tree with 7 nodes?
3
7
4
2
Which of these data structures can be used to efficiently determine if a given binary tree is a valid BST?
Heap
Queue
Both Queue and Stack
Stack
In a binary tree, where is a new node typically inserted?
It depends on the data
As a leaf node
Anywhere, it doesn't matter
As the root node
The path from the root to any node in a binary tree is always:
Unique
Non-unique
Circular
Disconnected
A node's direct descendant in a binary tree is called its:
Sibling
Parent
Child
Ancestor
Can a binary tree be empty?
Yes
Only if it has a root node
Only if it has leaf nodes
No