MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In the ____ queue, the first index comes right after the last index.
A
linear queue
B
circular queue
C
priority queue
D
none of above
Explanation: 

Detailed explanation-1: -A circular queue is also a linear data structure like a normal queue that follows the FIFO principle but it does not end the queue; it connects the last position of the queue to the first position of the queue.

Detailed explanation-2: -Queue can be implemented using an Array, Stack or Linked List. The easiest way of implementing a queue is by using an Array. Initially the head(FRONT) and the tail(REAR) of the queue points at the first index of the array (starting the index of array from 0 ).

Detailed explanation-3: -A queue is a container of objects (a linear collection) that are inserted and removed according to the first-in first-out (FIFO) principle. An excellent example of a queue is a line of students in the food court of the UC.

Detailed explanation-4: -The correct answer is “option 1". CONCEPT: A circular queue is a queue whose last position is connected back to the first position. ENQUEUE – It is the operation to insert elements into the queue.

There is 1 question to complete.

BUY E-BOOK WITH ANSWER KEYS GIVEN AT THE END OF EVERY PAGE