MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The elements in a queue are removed at one end called ____
A
front
B
rear
C
near
D
none of above
Explanation: 

Detailed explanation-1: -Queue is an abstract data type or a linear data structure, in which the first element is inserted from one end called the rear, and the removal of existing element takes place from the other end called as front.

Detailed explanation-2: -In the queue only two operations are allowed enqueue and dequeue. Enqueue means to insert an item into the back of the queue, dequeue means removing the front item.

Detailed explanation-3: -A queue follows the FIFO (First In First Out) method and is open at both of its ends. Data insertion is done at one end rear end or the tail of the queue while deletion is done at the other end called the front end or the head of the queue.

Detailed explanation-4: -By convention, the end of the sequence at which elements are added is called the back, tail, or rear of the queue, and the end at which elements are removed is called the head or front of the queue, analogously to the words used when people line up to wait for goods or services.

There is 1 question to complete.