No student devices needed. Know more
17 questions
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?
ABCD
DCBA
DCAB
ABDC
In linked list implementation of a queue, where does a new element be inserted?
At the head of link list
At the centre position in the link list
At the tail of the link list
None of the mentioned
In linked list implementation of a queue, from where is the item deleted?
At the head of link list
At the centre position in the link list
At the tail of the link list
None of the mentioned
In linked list implementation of a queue, the important condition for a queue to be empty is?
FRONT is null
REAR is null
LINK is empty
None of the mentioned
In a circular queue, how do you increment the rear end of the queue?
rear++
(rear+1) % Number of Item
(rear % Number of Item)+1
rear–
What is the term for inserting into a full queue known as?
overflow
underflow
null pointer exception
all of the mentioned
Let the following circular queue can accommodate maximum six elements with the following data
front = 2 rear = 4
queue = _______; L, M, N, ___, ___
What will happen after ADD O operation takes place?
front = 2 rear = 5
queue = ______; L, M, N, O, ___
front = 3 rear = 5
queue = L, M, N, O, ___
front = 3 rear = 4
queue = ______; L, M, N, O, ___
front = 2 rear = 4
queue = L, M, N, O, ___
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.
0
7
9
10
What is the reason for using a "circular queue" instead of a regular one?
running time of enqueue() is improved
reuse empty spaces
you can traverse all the elements more efficiently
none of the above
In Queue Insertion & Deletion take place at ________________.
same end
first end
different end
last end
One difference between a queue and a stack is:
Queues require dynamic memory, but stacks do not
Stacks require dynamic memory, but queues do not.
Queues use two ends of the structure; stacks use only one.
Stacks use two ends of the structure, queues use only one.
If the numbers 5, 10, 3, 42 are enqueued onto a queue in that order, what does dequeue return?
5
10
3
42
Queue can be implemented using a list?
True
False
What is the term for inserting into a full queue known as?
underflow
overflow
front
rear
The essential condition which is checked before insertion in a linked queue is?
Underflow
Overflow
Front value
Rear value
A queue of characters currently contained a,b,c,d. What would be the contents of queue after the following operationDELETE, ADD W, ADD X, DELETE, ADD Y.
A,B,C,W,Y
A,B,C,D,W
C,D,W,X,Y
W,Y,X,C,D
If front=rear ,then the queue is?
full
undeflow
overflow
empty
Explore all questions with a free account