Data Structure Multiple Choice Questions and Answers on Queue Operations

1. A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a ?

a) Queue
b) Stack
c) Tree
d) Linked list
Answer: a

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

a) Stack
b) Array
c) Queue
d) Tree
Answer: c
3. A queue is a ?
a) FIFO (First In First Out) list
b) LIFO (Last In First Out) list
c) Ordered array
d) Linear tree
Answer: a
4. 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
Answer: b
5. If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?

a) ABCD
b) DCBA
c) DCAB
d) ABCD
Answer: a

Explanation: Queue follows FIFO approach.
6. 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
Answer: c
7. 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
Answer: a

Explanation: Condition for size of queue.
8. Queues serve major role in

a) Simulation of recursion
b) Simulation of arbitrary linked list
c) Simulation of limited resource allocation
d) All of the mentioned
Answer: c

Explanation: Rest all are implemented using other data structures.
9. Which of the following is not the type of queue?

a) Ordinary queue
b) Single ended queue
c) Circular queue
d) Priority queue
Answer: b

Explanation: Queue always has two ends.

Related

Multiple Choice Questions 7760216033973267695

Post a Comment

emo-but-icon

item