Data Structure MCQ (Multiple Choice Questions)
Data Structure MCQ (Multiple Choice Questions)
4. The data structure required to check whether an expression contains a balanced parenthesis is?
a) Queue
b) Stack
c) Tree
d) Array
View Answer
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 1/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
advertisement
8. What data structure would you mostly likely see in non recursive implementation of a recursive
algorithm?
a) Stack
b) Linked List
c) Tree
d) Queue
View Answer
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 2/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
9. Which of the following statement(s) about stack data structure is/are NOT correct?
a) Top of the Stack always contain the new node
b) Stack is the FIFO data structure
c) Null link is present in the last node at the bottom of the stack
d) Linked List are used for implementing Stacks
View Answer
10. The data structure required for Breadth First Traversal on a graph is?
a) Array
b) Stack
c) Tree
d) Queue
View Answer
12. Which of the following points is/are not true about Linked List data structure when it is
compared with an array?
a) Random access is not allowed in a typical implementation of Linked Lists
b) Access of elements in linked list takes less time than compared to arrays
c) Arrays have better cache locality that can make them better in terms of performance
d) It is easy to insert and delete elements in Linked List
View Answer
13. Which data structure is based on the Last In First Out (LIFO) principle?
a) Tree
b) Linked List
c) Stack
d) Queue
View Answer
14. Which of the following application makes use of a circular linked list?
a) Recursive function calls
b) Undo operation in a text editor
c) Implement Hash Tables
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 3/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
advertisement
16. Which of the following tree data structures is not a balanced binary tree?
a) Splay tree
b) B-tree
c) AVL tree
d) Red-black tree
View Answer
18. Which of the following data structures can be used for parentheses matching?
a) n-ary tree
b) queue
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 4/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
c) priority queue
d) stack
View Answer
advertisement
21. Which of the following is the most widely used external memory data structure?
a) B-tree
b) Red-black tree
c) AVL tree
d) Both AVL tree and Red-black tree
View Answer
b) Array
c) String
d) Cord
View Answer
main()
{
char str[]="san foundry";
int len = strlen(str);
int i;
for(i=0;i<len;i++)
push(str[i]); // pushes an element into stack
for(i=0;i<len;i++)
pop(); //pops an element from the stack
}
a) yrdnuof nas
b) foundry nas
c) sanfoundry
d) san foundry
View Answer
24. Which of the following data structure can provide efficient searching of the elements?
a) binary search tree
b) unordered lists
c) 2-3 tree
d) treap
View Answer
26. What is the time complexity for searching a key or integer in Van Emde Boas data structure?
a) O (M!)
b) O (log M!)
c) O (log (log M))
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 6/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
d) O (M2)
View Answer
27. The optimal data structure used to solve Tower of Hanoi is _________
a) Tree
b) Heap
c) Priority queue
d) Stack
View Answer
29. Which is the most appropriate data structure for reversing a word?
a) stack
b) queue
c) graph
d) tree
View Answer
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 7/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
31. Which of the following is the simplest data structure that supports range searching?
a) AA-trees
b) K-d trees
c) Heaps
d) binary search trees
View Answer
35. A data structure in which elements can be inserted or deleted at/from both ends but not in the
middle is?
a) Priority queue
b) Dequeue
c) Circular queue
d) Queue
View Answer
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 8/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
a) 4 and 2
b) 2 and 4
c) 5 and 3
d) 3 and 5
View Answer
8. Heap
9. Trie
10. Hash Tables
11. Graph
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 10/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 11/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
8. MCQ on Heap
The section contains Data Structure questions and answers on heap, binary and weak heap,
binomial and fibonacci heap, d ary heap, ternary heap, pairing and leftlist heap, skew heap, min and
max heap.
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 12/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
Ternary Heap – 1
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 13/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
If you would like to learn "Data Structure" thoroughly, you should attempt to work on the complete
set of 1000+ MCQs - multiple choice questions and answers mentioned above. It will immensely
help anyone trying to crack an exam or an interview.
Note: We are working on pdf download for Data Structure MCQs and will publish the download link
here. Fill this Data Structure mcq pdf download request form for download notification.
Wish you the best in your endeavor to learn and master Data Structure!
Important Links:
advertisement
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 14/15
28/11/2023, 09:16 Data Structure MCQ (Multiple Choice Questions) - Sanfoundry
Additional Resources:
Data Structures in C
Data Structures in C++
Data Structures in Java
Data Science MCQ PDF Download
C Programs on Arrays
Popular Pages:
Design & Analysis of Algorithms MCQ Questions
LISP MCQ Questions
Antenna MCQ Questions
C# MCQ Questions
Visual Basic MCQ Questions
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on
development of Linux Kernel, SAN Technologies, Advanced C, Data
Structures & Alogrithms. Stay connected with him at LinkedIn.
https://www.sanfoundry.com/1000-data-structure-questions-answers/ 15/15