InterviewSolution
| 1. |
How to represent Queue using Array, Explain? |
|
Answer» To represent a queue using an array you need two index pointers: one for the head of the queue and one for the tail. Insertions are made by adjusting the tail pointer and DELETIONS by adjusting the head pointer. If either pointer advances beyond the valid array index then it is set to the opposite end of the array (making the array circular). |
|