Queue

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

The data structure required for Breadth First Traversal on a graph is?
a) Stack
b) Array
c) Queue
d) Tree

A queue follows ______________
a) FIFO (First In First Out) principle
b) LIFO (Last In First Out) principle
c) Ordered array
d) Linear tree

Circular Queue is also known as ________________
a) Ring Buffer
b) Square Buffer
c) Rectangle Buffer
d) Curve Buffer

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

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

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

Which of the following is not the type of queue?
a) Ordinary queue
b) Single ended queue
c) Circular queue
d) Priority queue

In Breadth First Search of Graph, which of the following data structure is used?
a) Stack
b) Queue
c) Linked list
d) None

In linked list implementation of a queue, where does a new element be
inserted?
a) At the head of link list
b) At the tail of the link list
c) At the centre position in the link list
d) None

In the array implementation of circular queue, which of the following
operation take worst case linear time?
a) Insertion
b) Deletion
c) To empty a queue
d) None

In linked list implementation of queue, if only front pointer is maintained, which
of the following operation take worst case linear time?
a) Insertion
b) Deletion
c) To empty a queue
d) Both a) and c)

A circular queue is implemented using an array of size 10. The array index
starts with 0, front is 6, and rear is 9. The insertion of next element takes place at
the array index.
a) 0
b) 7
c) 9
d) 10

n linked list implementation of a queue, front and rear pointers are tracked.
Which of these pointers will change during an insertion into a NONEMPTY queue?
a) Only front pointer
b) Only rear pointer
c) Both front and rear pointer
d) None of the front and rear pointer

In linked list implementation of a queue, front and rear pointers are tracked.
Which of these pointers will change during an insertion into EMPTY queue?
a) Only front pointer
b) Only rear pointer
c) Both front and rear pointer
d) None

An array of size MAX_SIZE is used to implement a circular queue. Front, Rear,
and count are tracked. Suppose front is 0 and rear is MAX_SIZE -1. How many
elements are present in the queue?
a) Zero
b) One
c) MAX_SIZE-1
d) MAX_SIZE

What is the worst case time complexity of a sequence of n queue operations
on an initially empty queue?
a) θ (n)
b) θ (n + k)
c) θ (nk)
d) θ (n2)