11
What is a key characteristic of a balanced binary tree?
A)
The height difference between the left and right subtrees is at most 1
B)
The left subtree is always smaller than the right subtree
C)
The right subtree is always smaller than the left subtree
D)
All levels of the tree are completely filled
Answer & Solution
Answer: Option
A
12
In which type of binary tree is every node with two children in the internal node?
A)
Full Binary Tree
B)
Complete Binary Tree
C)
Perfect Binary Tree
D)
Binary Search Tree
Answer & Solution
Answer: Option
C
13
What is the main advantage of an AVL tree over a standard binary search tree?
A)
AVL trees maintain balance, ensuring O(log n) operations
B)
AVL trees allow faster search operations
C)
AVL trees require less space
D)
AVL trees are easier to implement
Answer & Solution
Answer: Option
A
14
In a Red-Black tree, which property ensures that the tree remains balanced?
A)
Every node is either red or black
B)
The root is always black
C)
Every path from a node to its descendant leaves has the same number of black nodes
D)
Every node has at most two children
Answer & Solution
Answer: Option
C
15
Which traversal method of a binary tree visits the root node first?
A)
Preorder
B)
Inorder
C)
Postorder
D)
Level-order
Answer & Solution
Answer: Option
A
16
In a Binary Search Tree (BST), what is the time complexity of searching for an element in the worst case?
A)
O(1)
B)
O(log n)
C)
O(n)
D)
O(n log n)
Answer & Solution
Answer: Option
C
17
What type of tree traversal involves visiting the root node, then recursively visiting the left subtree, and finally the right subtree?
A)
Preorder
B)
Inorder
C)
Postorder
D)
Level-order
Answer & Solution
Answer: Option
A
18
Which type of binary tree traversal is useful for creating a sorted list of elements?
A)
Inorder
B)
Preorder
C)
Postorder
D)
Level-order
Answer & Solution
Answer: Option
A
19
What is the key difference between a complete binary tree and a full binary tree?
A)
A complete binary tree is filled completely at all levels except possibly the last, while a full binary tree has all nodes with either 0 or 2 children.
B)
A full binary tree is filled completely at all levels except possibly the last, while a complete binary tree has all nodes with either 0 or 2 children.
C)
A complete binary tree has only one level, while a full binary tree has multiple levels.
D)
There is no difference.
Answer & Solution
Answer: Option
A
20
Which type of binary tree is specifically designed to store key-value pairs and supports efficient search, insertion, and deletion operations?
A)
AVL Tree
B)
Red-Black Tree
C)
B-Tree
D)
Splay Tree
Answer & Solution
Answer: Option
C