Top 50+ Solved Linear Data Structures -Stacks and Queues MCQ Questions Answer
Q. The prefix form of an infix expression (p + q) – (r * t) is?
a. + pq – *rt
b. – +pqr * t
c. – +pq * rt
d. – + * pqrt
Q. When an operand is read, which of the following is done?
a. It is placed on to the output
b. It is placed in operator stack
c. It is ignored
d. Operator stack is emptied
Q. What should be done when a left parenthesis ‘(‘ is encountered?
a. It is ignored
b. It is placed in the output
c. It is placed in the operator stack
d. The contents of the operator stack is emptied
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