Data Structures - MCQs Set 2
1. Which of the following data structures allows insertion and deletion at one end only?
(a) Stack
(b) Queue
(c) Deque
(d) Tree
Answer: (a) Stack
2. What is the maximum number of nodes in a binary tree of height 'h'?
(a) 2^h - 1
(b) 2h
(c) h^2
(d) h
Answer: (a) 2^h - 1
3. Which of these is not a type of linked list?
(a) Single
(b) Double
(c) Circular
(d) Linear Tree
Answer: (d) Linear Tree
4. In which tree, every internal node has either 0 or 2 children?
(a) Binary Tree
(b) Full Binary Tree
(c) Complete Binary Tree
(d) Balanced Tree
Answer: (b) Full Binary Tree
5. Which of the following is used to implement recursion?
(a) Queue
(b) Stack
(c) Heap
(d) Linked List
Answer: (b) Stack
6. Which data structure is used for BFS (Breadth First Search) in graphs?
(a) Stack
(b) Queue
(c) Array
(d) Tree
Answer: (b) Queue
7. Which data structure uses key-value pair?
(a) Stack
(b) Queue
(c) Hash Table
(d) Array
Answer: (c) Hash Table
8. Which operation is the most time-consuming in a singly linked list?
(a) Insertion at head
(b) Deletion at head
(c) Accessing the last element
(d) Traversal
Answer: (c) Accessing the last element
9. Which data structure is ideal for implementing undo operations?
(a) Stack
(b) Queue
(c) Deque
(d) Tree
Answer: (a) Stack
10. What does a binary search require?
(a) Unsorted data
(b) Random data
(c) Sorted data
(d) Duplicate data
Answer: (c) Sorted data