Question
Option 4 : Full with 5 elements, since (rear+1) mod 5 equals front / 5 अवयवों सहित पूर्ण, क्योंकि (rear+1) mod 5 = front
Detailed Solution
सही उत्तर Full with 5 elements, since (rear+1) mod 5 equals front / 5 अवयवों सहित पूर्ण, क्योंकि (rear+1) mod 5 = front है।
Question:
A circular queue of capacity 5 has front = 0 and rear = 3 (holding 4 elements). After one dequeue followed by two enqueues, the queue is / क्षमता 5 वाली वृत्तीय कतार में front = 0 और rear = 3 है (4 अवयव हैं)। एक dequeue के बाद दो enqueue करने पर कतार होगी
Correct Answer: Full with 5 elements, since (rear+1) mod 5 equals front / 5 अवयवों सहित पूर्ण, क्योंकि (rear+1) mod 5 = front
After the dequeue front becomes 1 (3 elements); two enqueues move rear to 4 then wrap to 0 (5 elements). Now (0+1) mod 5 = 1 = front, the standard full condition. / Dequeue के बाद front = 1 (3 अवयव); दो enqueue से rear 4 फिर लिपटकर 0 (5 अवयव)। अब (0+1) mod 5 = 1 = front, जो मानक पूर्ण-शर्त है।