Q.1 What is the maximum number of nodes at level 'l' in a binary tree?
2^l
l^2
2*l
l+1
Explanation - In a binary tree, the maximum number of nodes at level l (root at level 0) is 2^l.
Correct answer is: 2^l
Q.2 What is the minimum possible height of a binary tree with n nodes?
log2(n+1)
n
sqrt(n)
n/2
Explanation - The minimum height occurs in a complete binary tree, which is log2(n+1) (rounded down).
Correct answer is: log2(n+1)
Q.3 Which traversal is used to get the nodes of a binary search tree in ascending order?
Pre-order
Post-order
In-order
Level-order
Explanation - In a BST, in-order traversal visits nodes in ascending order.
Correct answer is: In-order
Q.4 Which type of binary tree has all levels completely filled except possibly the last, which is filled from left to right?
Full Binary Tree
Complete Binary Tree
Perfect Binary Tree
Degenerate Tree
Explanation - A complete binary tree fills all levels completely except the last, which is filled from left to right.
Correct answer is: Complete Binary Tree
Q.5 A binary tree where each node has either 0 or 2 children is called?
Full Binary Tree
Complete Binary Tree
Perfect Binary Tree
Skewed Tree
Explanation - In a full binary tree, every node has 0 or 2 children.
Correct answer is: Full Binary Tree
Q.6 What is the time complexity of searching an element in a balanced binary search tree?
O(n)
O(log n)
O(n log n)
O(1)
Explanation - In a balanced BST, search time is proportional to tree height, which is log n.
Correct answer is: O(log n)
Q.7 In a binary tree with n nodes, the maximum number of edges is?
n
n-1
n+1
2n-1
Explanation - A tree with n nodes always has n-1 edges.
Correct answer is: n-1
Q.8 Which traversal method uses the order: root, left subtree, right subtree?
Pre-order
In-order
Post-order
Level-order
Explanation - Pre-order traversal visits root first, then left, then right subtree.
Correct answer is: Pre-order
Q.9 What is the height of a tree with only one node?
0
1
-1
Depends on definition
Explanation - Height is measured as the number of edges on the longest path from root to leaf. Single node has height 0.
Correct answer is: 0
Q.10 A binary tree is said to be skewed if?
Each node has only one child
Each node has two children
All levels are full
It has only leaf nodes
Explanation - Skewed binary tree has nodes with only one child, forming a linear structure.
Correct answer is: Each node has only one child
Q.11 Which of the following is NOT a property of a binary search tree?
Left child < parent
Right child > parent
All nodes have 0 or 2 children
In-order traversal gives sorted sequence
Explanation - A BST does not require nodes to have 0 or 2 children; that's a full binary tree property.
Correct answer is: All nodes have 0 or 2 children
Q.12 What is the maximum number of nodes in a binary tree of height h?
2^h
2^(h+1) - 1
h^2
h+1
Explanation - A perfect binary tree of height h has 2^(h+1) - 1 nodes.
Correct answer is: 2^(h+1) - 1
Q.13 Which traversal method uses the order: left subtree, right subtree, root?
Pre-order
In-order
Post-order
Level-order
Explanation - Post-order traversal visits left subtree first, then right subtree, then root.
Correct answer is: Post-order
Q.14 In a binary search tree, which node has the minimum value?
Root node
Leftmost node
Rightmost node
Leaf node
Explanation - In a BST, the leftmost node holds the minimum value.
Correct answer is: Leftmost node
Q.15 If a tree has 15 nodes, what is the minimum possible height?
3
4
5
7
Explanation - Minimum height occurs in a complete tree. Height h satisfies 2^(h+1)-1 >= 15 → h=3.
Correct answer is: 3
Q.16 A tree in which every non-leaf node has exactly two children and all leaves are at the same level is called?
Full Binary Tree
Perfect Binary Tree
Complete Binary Tree
Degenerate Tree
Explanation - A perfect binary tree has all internal nodes with two children and all leaves at the same level.
Correct answer is: Perfect Binary Tree
Q.17 Which traversal method visits nodes level by level?
Pre-order
In-order
Post-order
Level-order
Explanation - Level-order traversal visits nodes one level at a time from top to bottom.
Correct answer is: Level-order
Q.18 Which binary tree is used to implement a priority queue?
Binary Search Tree
AVL Tree
Heap
Red-Black Tree
Explanation - Heap is a complete binary tree used to implement priority queues.
Correct answer is: Heap
Q.19 What is the maximum number of leaves in a binary tree with n nodes?
n/2
n-1
n
n+1
Explanation - In a binary tree, the maximum number of leaves is ceiling(n/2).
Correct answer is: n/2
Q.20 Which of the following trees is always height-balanced?
AVL Tree
BST
Full Binary Tree
Skewed Tree
Explanation - AVL tree is a self-balancing binary search tree where height difference between left and right subtrees is ≤1.
Correct answer is: AVL Tree
Q.21 In a binary search tree, deleting a node with two children requires?
Replace with left child
Replace with right child
Replace with inorder predecessor or successor
Delete both children too
Explanation - To maintain BST properties, a node with two children is replaced with its inorder predecessor or successor.
Correct answer is: Replace with inorder predecessor or successor
Q.22 The total number of null pointers in a binary tree with n nodes is?
n
n+1
2n
2n+1
Explanation - A binary tree with n nodes has n+1 null pointers, as each missing child counts as null.
Correct answer is: n+1
Q.23 Which of the following is a degenerate (pathological) tree?
Complete Binary Tree
Skewed Binary Tree
Full Binary Tree
Perfect Binary Tree
Explanation - A skewed tree resembles a linked list, where each parent has only one child.
Correct answer is: Skewed Binary Tree
Q.24 Which property is unique to a min-heap?
Root has the largest value
Root has the smallest value
All leaves are at the same level
Left child is always greater than right child
Explanation - In a min-heap, the root node contains the minimum value in the tree.
Correct answer is: Root has the smallest value
Q.25 Which tree traversal can be implemented using a queue?
Pre-order
In-order
Post-order
Level-order
Explanation - Level-order traversal uses a queue to process nodes level by level.
Correct answer is: Level-order
