You are on page 1of 15

Branchwise MCQs School MCQs DSA Tests Jobs Internship Training Videos Books Contact

Interview Preparation

Dynamic Programming
Data Structure MCQ
Problems-Solutions (Multiple Choice
1000 C Problems- Questions)
Algorithms-Solutions
1000 C++ Problems- Here are 1000 Data Structure MCQ
Algorithms-Solutions (Chapterwise).

1000 Java Problems- 1. What is a data structure?


Algorithms-Solutions
a) A programming language
1000 Python Problems- b) A collection of algorithms
Solutions c) A way to store and organize data
1000 Data Structures & d) A type of computer hardware
Algorithms I MCQs View Answer Related Topics
1000 Data Structures &
Data Structures in C
Algorithms II MCQs 2. What are the disadvantages of arrays?
a) Index value of an array can be negative Data Structures in C++
1000 Python MCQs
b) Elements are sequentially accessed Data Structures in Java
1000 Java MCQs c) Data structure like queue or stack
Data Science MCQ PDF Download
1000 C++ MCQs cannot be implemented
d) There are chances of wastage of C Programs on Arrays
1000 C MCQs
memory space if elements inserted in an
1000 C# MCQs array are lesser than the allocated size
1000 Basic C Programs View Answer
1000 Basic C# Programs
1000 Basic Java Programs 3. Which data structure is used for
implementing recursion?
a) Stack
b) Queue
c) List
d) Array
View Answer

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
Ad
Seek to shop? We'll ship it.
5. Which of the following
Shop & Shipis not the

application of stack?
a) Data Transfer between two
asynchronous process
b) Compiler Syntax Analyzer Popular Pages
c) Tracking of local variables at run time
Design &program
d) A parentheses balancing Analysis of Algorithms MCQ
Questions
View Answer
LISP MCQ Questions
C# MCQ Questions
advertisement
Branch wise MCQs
Antenna MCQ Questions
50k Computer Science
Visual Basic MCQ Questions
MCQs
50k Programming MCQs
50k Information
Technology MCQs
50k Information Science
MCQs
50k Electronics &
Communication Engg
MCQs
50k Electrical & Electronics
MCQs
50k Electrical Engineering 6. Which data structure is needed to
MCQs convert infix notation to postfix notation?
a) Tree
50k Mechanical b) Branch
Engineering MCQs
c) Stack
50k Civil Engineering d) Queue
MCQs
View Answer
50k Chemical Engineering
MCQs
7. What is the value of the postfix
50k Metallurgical expression 6 3 2 4 + – *?
Engineering MCQs a) 74
50k Instrumentation b) -18
Engineering MCQs c) 22
d) 40
50k Mechatronics
Engineering MCQs View Answer
50k Biotechnology MCQs
8. What data structure would you mostly
50k Aeronautical likely see in non recursive
Engineering MCQs
implementation of a recursive algorithm?
50k Aerospace a) Stack
Engineering MCQs b) Linked List
50k Mining Engineering c) Tree
MCQs d) Queue
50k Marine Engineering View Answer
MCQs
50k Agricultural 9. Which of the following statement(s)
Engineering MCQs about stack data structure is/are NOT
correct?
50k MCA MCQs
a) Top of the Stack always contain the
50k BCA MCQs 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

11. The prefix form of A-B/ (C * D ^ E) is?


a) -A/B*C^DE
b) -A/BC*^DE
c) -ABCD*^DE
d) -/*^ACBDE
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
d) Allocating CPU to resources
View Answer

15. What is a bit array?


a) Data structure that compactly stores
bits
b) Data structure for representing arrays
of records
c) Array in which elements are not
present in continuous locations
d) An array in which most of the elements
have the same value
View Answer

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

17. Which of the following is not the type


of queue?
a) Priority queue
b) Circular queue
c) Single ended queue
d) Ordinary queue
View Answer

18. Which of the following data structures


can be used for parentheses matching?
a) n-ary tree
b) queue
c) priority queue
d) stack
View Answer

19. Which algorithm is used in the top


tree data structure?
a) Backtracking
b) Divide and Conquer
c) Branch
d) Greedy
View Answer

20. What is the need for a circular queue?


a) easier computations
b) implement LIFO principle in queues
c) effective usage of memory
d) to delete elements based on priority
View Answer

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

22. Which of the following is also known


as Rope data structure?
a) Linked List
b) Array
c) String
d) Cord
View Answer

23. What will be the output of the


following program?

main()
{
char str[]="san foundry";
int len = strlen(str);
int i;

for(i=0;i<len;i++)
push(str[i]); // pushes an ele

for(i=0;i<len;i++)
pop(); //pops an element from th
}

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

25. What is an AVL tree?


a) a tree which is unbalanced and is a
height balanced tree
b) a tree which is balanced and is a height
balanced tree
c) a tree with atmost 3 children
d) a tree with three children
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))
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

28. What is the use of the bin data


structure?
a) to have efficient traversal
b) to have efficient region query
c) to have efficient deletion
d) to have efficient insertion
View Answer

29. Which is the most appropriate data


structure for reversing a word?
a) stack
b) queue
c) graph
d) tree
View Answer

30. What is the functionality of the


following piece of code?

public void display()


{
if(size == 0)
System.out.println("und
else
{
Node current = first;
while(current != null)
{
System.out.prin
current = curre
}
}
}

a) display the list


b) reverse the list
c) reverse the list excluding top-of-the-
stack-element
d) display the list excluding top-of-the-
stack-element
View Answer

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

32. What is the advantage of a hash table


as a data structure?
a) easy to implement
b) faster access of data
c) exhibit good locality of reference
d) very efficient for less number of entries
View Answer

33. Which type of data structure is a


ternary heap?
a) Hash
b) Array
c) Priority Stack
d) Priority Queue
View Answer

34. What is a dequeue?


a) A queue implemented with both singly
and doubly linked lists
b) A queue with insert/delete defined for
front side of the queue
c) A queue with insert/delete defined for
both front and rear ends of the queue
d) A queue implemented with a doubly
linked list
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

36. What is the output of the following


Java code?

public class array


{
public static void main(String
{
int []arr = {1,2,3,4,5}
System.out.println(arr[
System.out.println(arr[
}
}

a) 4 and 2
b) 2 and 4
c) 5 and 3
d) 3 and 5
View Answer

37. In simple chaining, what data


structure is appropriate?
a) Doubly linked list
b) Circular linked list
c) Singly linked list
d) Binary trees
View Answer

Chapterwise Multiple Choice


Questions on Data Structure
Our 1000+
multiple choice
questions and
answers (MCQs)
on “Data
Structure – I”
(along with
1000+ MCQs on
“Data Structure – II (Algorithms)”) focuses
on all chapters of Data Structure covering
200+ topics. You can find MCQs on Data
Structure – II (Algorithms) here. This Data
Structure MCQ will help you to prepare
for exams, contests, online tests, quizzes,
viva-voce, interviews, and certifications.
You can practice these MCQs chapter by
chapter starting from the 1st chapter or
you can jump to any chapter of your
choice. You can also download the PDF of
Data Structure MCQs by applying below.
1. Abstract Data Types
2. Application of Stacks
3. Arrays Types
4. Types of Lists
5. Binary Trees
6. B-Trees
7. Trees
8. Heap
9. Trie
10. Hash Tables
11. Graph

1. Data Structure MCQ on


Abstract Data Types
The section contains Data Structure
multiple choice questions and answers on
arrays, stacks, queues, single linked lists,
doubly and circular linked lists, stacks
using arrays and linked lists, queues using
arrays, stacks and linked lists, priority
queues and double ended queues.
Array and Circular Linked
Array Operations Lists
Stack Stack using
Operations – 1 Array
Stack Stack using
Operations – 2 Linked List
Stack Queue using
Operations – 3 Array
Queue Queue using
Operations Linked List
Singly Linked Priority Queue
Lists Operations – Double Ended
1 Queue (Dequeue)
Singly Linked Queue using
Lists Operations – Stacks
2 Stack using
Singly Linked Queues
Lists Operations –
3
Singly Linked
Lists
Doubly Linked
Lists

2. Multiple Choice Questions


on Application of Stacks
The section contains Data Structure
questions and answers on decimal to
binary using stacks, towers of hanoi,
expression evaluation of infix, prefix and
postfix, conversions like infix to postfix,
postfix to infix, prefix to infix and infix to
prefix conversions, reversing the word
using stack and balanced parenthesis.

Decimal to Prefix to Infix


Binary using Conversion
Stacks Postfix to Infix
Evaluation of Conversion
an Infix Towers of
Expression (Not Hanoi
Parenthesized) Reverse a
Evaluation of a Word using Stack
Prefix Expression Balanced
Evaluation of a Parenthesis
Postfix Expression
Infix to Prefix
Conversion
Infix to Postfix
Conversion

3. Data Structure MCQ on


Arrays Types
The section contains Data Structure
MCQs on bit array, dynamic and parallel
array, count inversion, rotation and
reversal array operations, end array
operations, sparse and suffix array,
matrix and sparse matrix.

Bit Array Sparse Matrix


Dynamic Array Count
Parallel Array Inversion
Sparse Array Rotation Array
Suffix Array Operation
Matrix Reversal Array
Operation
Number of
Jumps to Reach
End-array
Operation

4. Data Structure MCQ on


Types of Lists
The section contains Data Structure
multiple choice questions and answers on
skip list, self organizing list, xor linked list
and free list.

Skip List Xor Linked List


Self Organizing Free List
List

5. Multiple Choice Questions


on Binary Trees
The section contains Data Structure
questions and answers on binary trees
using arrays and linked lists, preorder,
postorder and inorder traversal, avl tree,
binary tree properties and operations,
cartesian tree, weight balanced tree, red
black and splay trees, threaded binary
tree and binary search trees, aa tree, top
tree, treap, tango tree and rope.
Binary Trees AA Tree
using Array AVL Tree
Binary Trees Cartesian Tree
using Linked Lists Weight
Binary Tree Balanced Tree
Operations Red Black Tree
Preorder Top Tree
Traversal Splay Tree
Postorder Treap
Traversal Threaded
Inorder Binary Tree
Traversal Tango Tree
Binary Tree Rope
Properties
Binary Search
Tree
Balanced
Binary Tree
Self Balancing
Binary Search
Tree
Randomized
Binary Search
Tree

6. Data Structure MCQs on B-


Trees
The section contains Data Structure
MCQs on b tree, b+ tree and 2-3 tree.

B-Tree 2-3 Tree


B+ Tree

7. Data Structure MCQ on


Trees
The section contains Data Structure
multiple choice questions and answers on
trees like ternary tree, k-ary tree, kd tree,
expression tree, bin, van emde boas tree
and disjoint set data structure.

Ternary Tree – Disjoint-Set


1 Data Structure
Ternary Tree – Bin
2 KD Tree
K-ary Tree – 1 Expression
K-ary Tree – 2 Tree
Van Emde Boas
Tree

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.

Heap Ternary Heap –


Binary Heap 2
Weak Heap Pairing Heap
Binomial and Leftlist Heap
Fibonacci Heap Skew Heap
D-ary Heap Min/Max Heap
Ternary Heap –
1

9. Data Structure Multiple


Choice Questions on Trie
The section contains Data Structure
MCQs on trie and suffix tree.

Trie Suffix Tree – 2


Suffix Tree – 1

10. Data Structure MCQ on


Hash Tables
The section contains Data Structure
multiple choice questions and answers on
hash tables, direct addressing tables,
hash tables chaining using linked lists,
doubly linked lists, binary trees and list
heads, hash tables with linear and
quadratic probing, hashing functions,
hash tree, min hash and double hashing.

Hash Tables Hash Tables


Hash Tables with Quadratic
Chaining using Probing
Linked Lists Hashing
Hash Tables Functions
Chaining using Double
Hashing
Doubly Linked Hash Tree
Lists Min Hash
Hash Tables Direct
Chaining with Addressing Tables
Binary Trees
Hash Tables
Chaining with List
Heads
Hash Tables
with Linear
Probing

11. Data Structure MCQ on


Graph
The section contains Data Structure
questions and answers on graph,
adjacency matrix, incidence matrix,
adjacency list, directed and undirected
graph, directed acyclic graphs, multigraph
and hypergraph, binary decision
diagrams & and-inverter graph.

Graph Directed Graph


Adjacency Directed
Matrix Acyclic Graph
Incidence Propositional
Matrix and Graph and Directed
Structured Stack Acyclic Word
Adjacency List Graph
Undirected Multigraph and
Graph Hypergraph
Binary Decision
Diagrams & and
Inverter Graph

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:

Design & Analysis of Algorithms


Multiple Choice Questions
C Multiple Choice Questions
C++ Multiple Choice Questions
Java Multiple Choice Questions
Python Multiple Choice Questions
C# Multiple Choice Questions
Computer Science Multiple Choice
Questions
Data Structure and Algorithms
Books
Data Structure Online Test

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.

Subscribe to his free Masterclasses at


Youtube & discussions at Telegram
SanfoundryClasses.

About | Certifications | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2023 Sanfoundry. All Rights Reserved.

You might also like