158k views
5 votes
The ____ operation on a queue returns the last element in the queue, but does not remove the element from the queue

A.
front

B.
back

C.
pop

D.
push

1 Answer

5 votes

Answer:

back

Step-by-step explanation:

queue is the data structure which perform operation in particular order. the order is first in first out (FIFO).

it means the element which comes first, remove first.

front: it is used to fetch the first element or oldest element in the queue.

back: it is used to fetch the last element or newest element in the queue.

pop: it is used to remove the first element or oldest element in the queue.

push: it is used to insert the element at the back in the queue.

Therefore, the back is the correct option.

User Att Righ
by
5.7k points