Queue•Easy
IsEmpty & IsFull
Queue IsEmpty & IsFull Operations

Boundary state operations determine whether the queue has reached its limits of being completely empty or completely full.
1. IsEmpty
Checks if the queue is empty.
- Rule: If the
frontindex pointer is-1, it indicates that no elements have been enqueued yet, or the queue has been reset to an empty state after all elements were dequeued. - Return: Returns
trueiffront == -1, otherwise returnsfalse.
2. IsFull
Checks if the queue has reached its capacity.
- Rule (Linear Queue): If the
rearpointer is pointing to the final index of the array (rear == MAX - 1), then there is no memory remaining to perform another enqueue operation. - Return: Returns
trueifrear == MAX - 1, otherwise returnsfalse.