Computer Science · Data Structures
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 empty and queue full are:
- 1EMPTY: REAR == FRONT; FULL: (REAR + 1) mod n == FRONT✓
- 2EMPTY: (FRONT + 1) mod n == REAR; FULL: (REAR + 1) mod n == FRONT
- 3EMPTY: (REAR + 1) mod n == FRONT; FULL: REAR == FRONT
- 4EMPTY: REAR == FRONT; FULL: (FRONT + 1) mod n == REAR
Correct answer
EMPTY: REAR == FRONT; FULL: (REAR + 1) mod n == FRONT
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Data Structures?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Data Structures