Help


from Wikipedia
« »  
In each of the cases, the customer or object at the front of the line was the first one to enter, while at the end of the line is the last to have entered.
Every time a customer finishes paying for their items ( or a person steps off the escalator, or the machine part is removed from the assembly line, etc.
) that object leaves the queue from the front.
This represents the queue “ dequeue ” function.
Every time another object or customer enters the line to wait, they join the end of the line and represent the “ enqueue ” function.
The queue “ size ” function would return the length of the line, and the “ empty ” function would return true only if there was nothing in the line.

1.897 seconds.