Doubt: dequeue really deletes the element or just moves the pointer? I'm not getting the answer.
@techbd123
Checkout this question, please.
What @Roshan Pawar said in the first comment is absolutely right. The question has a problem. It should say the array had indices from $0$ to $5$ as it could hold $6$ elements. Besides, the question is similar to this.
64.3k questions
77.9k answers
244k comments
80.0k users