This article will be covering a list of all the important and commonly asked interview questions on data structure, which will help you to crack the interview…

Table of Contents

## Interview Questions on Data Structure on Array & Stack Operations MCQs

**Which of these best describes an array?**

A. A data structure that shows a hierarchical behavior

B. Container of objects of similar types

C. Container of objects of mixed types

D. All of the mentioned

**When does the ArrayIndexOutOfBoundsException occur?**

A. Compile-time

B. Run-time

C. Not an error

D. None of the mentioned

**Which of the following concepts make extensive use of arrays?**

A. Binary trees

B. Scheduling of processes

C. Caching

D. Spatial locality

**What are the advantages of arrays?**

A. Easier to store elements of same data type

B. Used to implement other data structures like stack and queue

C. Convenient way to represent matrices as a 2D array

D. All of the mentioned

**What are the disadvantages of arrays?**

A. We must know beforehand how many elements will be there in the array

B. There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size

C. Insertion and deletion becomes tedious

D. All of the mentioned

**Assuming int is of 4bytes, what is the size of int arr[15];?**

A. 15

B. 19

C. 11

D. 60

**Pushing an element into a stack already having five elements and a stack size of 5, then stack becomes**

A. Overflow

B. Crash

C. Underflow

D. User flow

**Entries in a stack are “ordered”. What is the meaning of this statement?**

A. A collection of stacks is sortable

B. Stack entries may be compared with the ‘<‘ operation

C. The entries are stored in a linked list

D. There is a Sequential entry that is one by one

**Which of the following applications may use a stack?**

A. A parentheses balancing program

B. Tracking of local variables at run time

C. Compiler Syntax Analyzer

D. All of the mentioned

**The data structure required to check whether an expression contains balanced parenthesis is?**

A. Stack

B. Queue

C. Array

D. Tree

## Interview Questions on Data Structure on Queue and Linked List

**The data structure required for Breadth-First Traversal on a graph is?**

A. Stack

B. Array

C. Queue

D. Tree

**A queue is a?**

A. FIFO (First In First Out) list

B. LIFO (Last In First Out) list

C. Ordered array

D. Linear tree

**In Breadth-First Search of Graph, which of the following data structure is used?**

A. Stack

B. Queue

C. Linked list

D. None of the mentioned

**A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?**

A. Queue

B. Circular queue

C. Dequeue

D. Priority queue

**Queues serve a major role in**

A. Simulation of recursion

B. Simulation of arbitrary linked list

C. Simulation of limited resource allocation

D. All of the mentioned

**Which of the following is not the type of queue?**

A. Ordinary queue

B. Single-ended queue

C. Circular queue

D. Priority queue

**Which of the following is not a disadvantage to the usage of the array?**

A. Fixed-size

B. You know the size of the array before allocation

C. Insertion based on position

D. Accessing elements at specified positions

**A linear collection of data elements where the linear node is given using the pointer is called?**

A. Linked list

B. Node list

C. Primitive list

D. None of the mentioned

**In the linked list, each node contains a minimum of two fields. One field is the data field to store the data second field is?**

A. Pointer to character

B. Pointer to integer

C. Pointer to node

D. Node

**The concatenation of two lists can be performed in O(1) time. Which of the following variation of the linked list can be used?**

A. Singly linked list

B. Doubly linked list

C. Circular doubly linked list

D. Array implementation of list

## Interview Questions on Data Structure on Stack Using Array and Linked List MCQs

**Which of the following real-world scenarios would you associate with a stack data structure?**

A. piling up of chairs one above the other

B. people standing in a line to be serviced at a counter

C. offer services based on the priority of the customer

D. all of the mentioned

**What does ‘stack underflow’ refer to?**

A. accessing item from an undefined stack

B. adding items to a full-stack

C. removing items from an empty stack

D. index out of bounds exception

**What happens when you pop from an empty stack while implementing using the Stack ADT in Java?**

A. Undefined error

B. Compiler displays a warning

C. EmptyStackException is thrown

D. NoStackException is thrown

**‘Array implementation of Stack is not dynamic’, which of the following statements supports this argument?**

A. space allocation for the array is fixed and cannot be changed during run-time

B. user unable to give the input for stack operations

C. a runtime exception halts execution

D. all of the mentioned

**Which of the following array element will return the top-of-the-stack-element for a stack of size N elements(capacity of stack > N).**

A. S[N-1].

B. S[N].

C. S[N-2].

D. S[N+1].

**What is the complexity of searching for a particular element in a Singly Linked List?**

A. O(n)

B. O(1)

C. logn

D. nlogn

**Which of the following statements are correct concerning Singly Linked List(SLL) and Doubly Linked List(DLL)?**

A. Complexity of Insertion and Deletion at known position is O(n) in SLL and O(1) in DLL

B. SLL uses lesser memory per node than DLL

C. DLL has more searching power than SLL

D. All of the mentioned

**What does ‘stack overflow’ refer to?**

A. accessing item from an undefined stack

B. adding items to a full-stack

C. removing items from an empty stack

D. index out of bounds exception

**Which of the following data structures can be used for parentheses matching?**

A. n-ary tree

B. queue

C. priority queue

D. stack

**The minimum number of queues to implement stack is _____**

A. 3

B. 4

C. 1

D. 2

## Interview Questions on Data Structure on Priority Queue & Dequeue MCQs

**With what data structure can a priority queue be implemented?**

A. Array

B. List

C. Heap

D. All of the mentioned

**Which of the following is not an application of priority queue?**

A. Huffman codes

B. Interrupt handling in the operating system

C. Undo operation in text editors

D. Bayesian spam filter

**What is not a disadvantage of priority scheduling in operating systems?**

A. A low priority process might have to wait indefinitely for the CPU

B. If the system crashes, the low priority systems may be lost permanently

C. Interrupt handling

D. None of the mentioned

**What are the advantages of priority queues?**

A. Easy to implement

B. Processes with different priorities can be efficiently handled

C. Applications with differing requirements

D. All of the mentioned

**What is a dequeue?**

A. A queue with insert/delete defined for both front and rear ends of the queue

B. A queue implemented with a doubly linked list

C. A queue implemented with both singly and doubly linked lists

D. None of the mentioned

**What are the applications of dequeue?**

A. A-Steal job scheduling algorithm

B. Can be used as both stack and queue

C. To find the maximum of all subarrays of size k

D. All of the mentioned

**Consider you have an array of some random size. You need to perform a de queue operation. You can perform it using stack operation (push and pop) or using queue operations itself (enQueue and Dequeue). The output is guaranteed to be the same. Find some differences?**

A. They will have different time complexities

B. The memory used will not be different

C. There are chances that output might be different

D. No differences

**Why is the implementation of stack operations on queues not feasible for a large dataset (Assume the number of elements in the stack to be n)?**

A. Because of its time complexity O(n)

B. Because of its time complexity O(log(n))

C. Extra memory is not required

D. There are no problems

**Given only a single array of size 10 and no other memory is available. Which of the following operation is not feasible to implement (Given only push and pop operation)?**

A. Push

B. Pop

C. Enqueue

D. Return top

**Given an array of size n, let’s assume an element is ‘touched’ if and only if some operation is performed on it(for example, for performing a pop operation the top element is ‘touched’). Now you need to perform a De-queue operation. Each element in the array is touched at least?**

A. Once

B. Twice

C. Thrice

D. Four times

## Interview Questions on Data Structure on Application of Stack MCQs

**How many stacks are required for applying the evaluation of the infix expression algorithm?**

A. one

B. two

C. three

D. four

**How many passes does the evaluation of the infix expression algorithm make through the input?**

A. One

B. Two

C. Three

D. Four

**Identify the infix expression from the list of options given below.**

A. a/b+(c-d)

B. abc*+d+ab+cd+*ce-f-

C. ab-c-

D. “+AB”

**Which of the following statement is incorrect concerning the evaluation of the infix expression algorithm?**

A. Operand is pushed onto the stack

B. If the precedence of the operator is higher, pop two operands and evaluate

C. If the precedence of the operator is lower, pop two operands and evaluate

D. The result is pushed onto the operand stack

**Evaluate the following statement using the infix evaluation algorithm and choose the correct answer. 1+2*3-2**

A. 3

B. 6

C. 5

D. 4

**Evaluation of infix expression is done based on the precedence of operators.**

A. TRUE

B. FALSE

C. Nothing can be said

D. None of the mentioned

**Evaluate the following and choose the correct answer.a/b+c*d where a=4, b=2, c=2, d=1.**

A. 1

B. 4

C. 5

D. 2

**Evaluate the following statement using the infix evaluation algorithm and choose the correct answer. 4*2+3-5/5**

A. 10

B. 11

C. 16

D. 12

**Using the evaluation of infix expression, evaluate a^b+c and choose the correct answer. (a=2, b=2, c=2)**

A. 12

B. 8

C. 10

D. 6

**How many stacks are required for the evaluation of prefix expression?**

A. one

B. two

C. three

D. four

## Interview Questions on Data Structure on Types of Lists MCQs

**Consider the 2-level skip list on how to access 38?**

A. travel 20-30-35-38

B. travel 20-30-40-38

C. travel 20-38

D. travel 20-40-38

**Skip lists are similar to which of the following data structure?**

A. stack

B. heap

C. binary search tree

D. balanced binary search tree

**To which data structure are skipped lists similar to in terms of time complexities in worst and best cases?**

A. balanced binary search trees

B. binary search trees

C. binary trees

D. linked lists

**The nodes in a skip list may have many forward references. their number is determined**

A. probabilistically

B. randomly

C. sequentially

D. orthogonally

**How to maintain multi-level skip list properties when insertions and deletions are done?**

A. design each level of a multi-level skip list with varied probabilities

B. that cannot be maintained

C. rebalancing of lists

D. reconstruction

**Is a skip list like a balanced tree?**

A. TRUE

B. FALSE

C. Nothing can be said

D. None of the mentioned

**What is an indexed skip list?**

A. it stores the width of the link in place of element

B. it stores index values

C. array-based linked list

D. indexed tree

**The self-organizing list improves the efficiency of ___**

A. binary search

B. jump search

C. sublist search

D. linear search

**Which of the following is true about the Move-To-Front Method for rearranging nodes?**

A. node with the highest access count is moved to the head of the list

B. requires extra storage

C. may over-reward infrequently accessed nodes

D. requires a counter for each node

## Interview Questions on Data Structure on Binary Tree Operations MCQs

**A binary tree is a rooted tree but not an ordered tree.**

A. TRUE

B. FALSE

C. Nothing can be said

D. None of the mentioned

**How many common operations are performed in a binary tree?**

A. 1

B. 2

C. 3

D. 4

**What is the traversal strategy used in the binary tree?**

A. depth-first traversal

B. breadth-first traversal

C. random traversal

D. preorder traversal

**How many types of insertion are performed in a binary tree?**

A. 1

B. 2

C. 3

D. 4

**General ordered trees can be encoded into binary trees.**

A. TRUE

B. FALSE

C. Nothing can be said

D. None of the mentioned

**How many bits would a succinct binary tree occupy?**

A. n+O(n)

B. 2n+O(n)

C. n/2

D. n

**How many orders of traversal can be applied to a binary tree?**

A. 1

B. 4

C. 2

D. 3

**If binary trees are represented in arrays, what formula can be used to locate a left child, if the node has an index i?**

A. 2i+1

B. 2i+2

C. 2i

D. 4i

**Using what formula can a parent node be located in an array?**

A. (i+1)/2

B. (i-1)/2

C. i/2

D. 2i/2

**What is the time complexity of pre-order traversal in the iterative fashion?**

A. O(1)

B. O(n)

C. O(logn)

D. O(nlogn)

## Interview Questions on Data Structure on Hash Tables MCQs

**If several elements are competing for the same bucket in the hash table, what is it called?**

A. Diffusion

B. Replication

C. Collision

D. None of the mentioned

**What can be the techniques to avoid a collision?**

A. Make the hash function appear random

B. Use the chaining method

C. Use uniform hashing

D. All of the mentioned

**In simple uniform hashing, what is the search complexity?**

A. O(n)

B. O(logn)

C. O(nlogn)

D. O(1)

**In simple chaining, what data structure is appropriate?**

A. Singly linked list

B. Doubly linked list

C. Circular linked list

D. Binary trees

**What data organization method is used in hash tables?**

A. Stack

B. Array

C. Linked list

D. Queue

**The task of generating alternative indices for a node is called?**

A. Collision handling

B. Collision detection

C. Collision recovery

D. Closed hashing

**Which of the following is not a collision resolution technique?**

A. Separate chaining

B. Linear probing

C. Quadratic probing

D. Hashing

**In a hash table of size 10, where is element 7 placed?**

A. 6

B. 7

C. 17

D. 16

**Which of the following operations are done in a hash table?**

A. Insert only

B. Search only

C. Insert and search

D. Replace

**Which of the following is identical to that of a separate chaining hash node?**

A. Linked list

B. Array

C. Stack

D. Queue

If you have any doubt related to these interview questions on data structure ask me in the comment section…

Source: Unique MCQs Apps

Read More>> Top 40 Data Structure Interview Questions

Also-Read: 30+ Basic Interview Questions on DBMS