COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
In a Queue Data Structure ____
|
New elements may only be added to the end of the queue
|
|
Elements may only be retrieved from the front of the queue.
|
|
Elements may only be retrieved from the end of the queue.
|
|
New elements may only be added to the front of the queue
|
Explanation:
Detailed explanation-1: -2. Input restricted Queue: In this type of Queue, the input can be taken from one side only(rear) and deletion of elements can be done from both sides(front and rear). This kind of Queue does not follow FIFO(first in first out).
Detailed explanation-2: -In queue, we will follow first in first out principle for insertion and deletion of elements. Element with least priority will be deleted in a priority queue.
Detailed explanation-3: -The “front” end pointer is the place from where the elements are removed from the queue. The operation to remove/delete elements from the queue is called “dequeue”.
There is 1 question to complete.