Top 350+ Solved Data Structures (DS) MCQ Questions Answer
Q. What is the time complexity of an infix to postfix conversion algorithm?
a. O(N log N)
b. O(N)
c. O(N2)
d. O(M log N)
Q. Which of the following statement is incorrect with respect to infix to postfix conversion algorithm?
a. operand is always placed in the output
b. operator is placed in the stack when the stack operator has lower precedence
c. parenthesis are included in the output
d. higher and equal priority operators follow the same condition
Q. In infix to postfix conversion algorithm, the operators are associated from?
a. right to left
b. left to right
c. centre to left
d. centre to right
Q. A linear list of elements in which deletion can be done from one end (front) and insertion can takeplace only at the other end (rear) is known as a ?
a. Queue
b. Stack
c. Tree
d. Linked list
Q. The data structure required for Breadth First Traversal on a graph is?
a. Stack
b. Array
c. Queue
d. Tree
Q. A queue follows
a. FIFO (First In First Out) principle
b. LIFO (Last In First Out) principle
c. Ordered array
d. Linear tree
Q. Circular Queue is also known as
a. Ring Buffer
b. Square Buffer
c. Rectangle Buffer
d. Curve Buffer
Q. If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in whatorder will they be removed?
a. ABCD
b. DCBA
c. DCAB
d. ABDC
Q. A data structure in which elements can be inserted or deleted at/from both the ends but not in themiddle is?
a. Queue
b. Circular queue
c. Dequeue
d. Priority queue
Q. A normal queue, if implemented using an array of size MAX_SIZE, gets full when
a. Rear = MAX_SIZE – 1
b. Front = (rear + 1)mod MAX_SIZE
c. Front = rear + 1
d. Rear = front
Q. Queues serve major role in
a. Simulation of recursion
b. Simulation of arbitrary linked list
c. Simulation of limited resource allocation
d. Simulation of heap sort
Q. Which of the following is not the type of queue?
a. Ordinary queue
b. Single ended queue
c. Circular queue
d. Priority queue
Q. Which of the following is not an application of priority queue?
a. Huffman codes
b. Interrupt handling in operating system
c. Undo operation in text editors
d. Bayesian spam filter
Q. What is the time complexity to insert a node based on key in a priority queue?
a. O(nlogn)
b. O(logn)
c. O(n)
d. O(n2)