How we traverse the Queue ?
When we think about that how we display or traverse the queue then two idea come in mind that
- traverse from front to rear
- traverse from rear to front
Which one is correct ?
'front to rear traverse' is the correct one because we traverse the element which come first in queue
Following is the which are used to display the queue from to rear: