Top 50+ Solved Linear Data Structures -Stacks and Queues MCQ Questions Answer

From 16 to 30 of 46

Q. The prefix form of an infix expression (p + q) – (r * t) is?

a. + pq – *rt

b. – +pqr * t

c. – +pq * rt

d. – + * pqrt

  • c. – +pq * rt

Q. Which data structure is used for implementing recursion?

a. Queue

b. Stack

c. Array

d. List

  • b. Stack

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

  • a. It is placed on to the output

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

  • c. It is placed in the operator stack

Q. Which of the following is an infix expression?

a. (a+b)*(c+d)

b. ab+c*

c. +ab

d. abc+*

  • a. (a+b)*(c+d)

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)

  • b. O(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

  • c. parenthesis are included in the output

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

  • b. left to right

Q. The data structure required for Breadth First Traversal on a graph is?

a. Stack

b. Array

c. Queue

d. Tree

  • c. Queue

Q. A queue follows

a. FIFO (First In First Out) principle

b. LIFO (Last In First Out) principle

c. Ordered array

d. Linear tree

  • a. FIFO (First In First Out) principle

Q. Circular Queue is also known as

a. Ring Buffer

b. Square Buffer

c. Rectangle Buffer

d. Curve Buffer

  • a. Ring Buffer

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

  • c. Dequeue
Subscribe Now

Get All Updates & News