Teaching UGC NET Mock Test Series 2025 (Paper 1 & 2) Programming and Data Structure Queue Circular Queue
Suppose a circular queue of capacity (n −1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are
1
full: (REAR+1) mod n == FRONT empty: REAR == FRONT
2
full: (REAR+1) mod n == FRONT empty: (FRONT+1) mod n == REAR
3
full: REAR == FRONT empty: (REAR+1) mod n == FRONT
4
full: (FRONT+1) mod n == REAR empty: REAR == FRONT