Top 350+ Solved Data Structures (DS) MCQ Questions Answer

From 211 to 225 of 370

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

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

  • a. Rear = MAX_SIZE – 1

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

  • c. Simulation of limited resource allocation

Q. Which of the following is not the type of queue?

a. Ordinary queue

b. Single ended queue

c. Circular queue

d. Priority queue

  • b. Single ended queue

Q. With what data structure can a priority queue be implemented?

a. Array

b. List

c. Heap

d. Tree

  • d. Tree

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

  • c. Undo operation in text editors

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)

  • c. O(n)
Subscribe Now

Get All Updates & News