Computer Science · Data Structures and Algorithms
A circular queue with capacity (n − 1) elements is implemented using an array of size n. If REAR and FRONT are used as array indices and initially REAR = FRONT = 0, what are the conditions for Queue Full and Queue Empty?
- 1Full: (REAR + 1) mod n == FRONT Empty: REAR == FRONT✓
- 2Full: REAR == FRONT Empty: (REAR + 1) mod n == FRONT
- 3Full: (REAR + 1) mod n == FRONT Empty: (FRONT + 1) mod n == REAR
- 4Full: (REAR + 1) mod n == FRONT Empty: REAR == FRONT == NULL
Correct answer
Full: (REAR + 1) mod n == FRONT Empty: REAR == 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 and Algorithms?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Data Structures and Algorithms