1 - Data Structure MCQ
1 - Data Structure MCQ
1 - Data Structure MCQ
1. Which of the following data structures allows rapid search, insertion, and
deletion operations?
a) Array
b) Linked List
c) Hash Table
d) Binary Tree
2. Which data structure follows the Last In First Out (LIFO) principle?
a) Queue
b) Stack
c) Tree
d) Linked List
10. What is the worst-case time complexity of binary search for an element
in a sorted array?
(a) O(1)
(b) O(log n)
(c) O(n)
(d) O(n^2)
DATA STRUCTURES MCQ
11)Which data structure is typically used to implement a First In First Out
(FIFO) queue?
(a) Array
(b) Linked List
(c) Stack
(d) Hash Table
12) In a binary search tree, which traversal method visits the nodes in
ascending order?
(a) Preorder
(b) Inorder
(c) Postorder
(d) Level order
16) Which data structure is used for topological sorting of a directed acyclic
graph (DAG)?
(a) Queue
(b) Stack
(c) Heap
(d) Linked List
17) Which data structure is suitable for implementing a cache with Least
Recently Used (LRU) eviction policy?
(a) Array
(b) Linked List
(c) Queue
(d) Stack
20) Which data structure is typically used for implementing a symbol table
in compilers?
(a) Hash Table
(b) Binary Search Tree
(c) Linked List
24. In a binary tree, the maximum number of nodes at level "k" is:
(A) 2^(k-1)
(B) 2^k
(C) k^2
(D) 2^(k+1) - 1
26. In which traversal of a binary tree are the nodes processed in the order:
left, root, right?
(A) Preorder
(B) Inorder
(C) Postorder
(D) Level order
27. Which data structure is used for implementing the Open Addressing
strategy in hashing?
(A) Array
DATA STRUCTURES MCQ
(B) Linked List
(C) Queue
(D) Stack
28. What is the time complexity of inserting an element into a binary search
tree?
(A) O(1)
(B) O(log n)
(C) O(n)
(D) O(n^2)
31. The minimum number of fields in each node of a doubly linked list is
____
(A) 2
(B) 3
(C) 4
DATA STRUCTURES MCQ
(D) None of the above
32. A graph in which all vertices have equal degree is known as ____
(A) Complete graph
(B) Regular graph
(C) Multigraph
(D) Simple graph
39. A binary tree in which all its levels except the last, have maximum
numbers of nodes and all the nodes in the last level have only one
child it will be its left child. Name the tree.
(A) Threaded tree
(B) Complete binary tree
(C) M-way search tree
(D) Full binary tree