Data Structures Stack And Queue. Queue is an abstract data structure, somewhat similar to stacks. Unlike stacks, a queue is open at both its ends.

If the queue is full already, exit and produce an overflow condition. Some real world examples include printing a file (and there's a file in queue), process scheduler, a waiting line. Stacks and queues are an abstract data type with a specific order for adding and removing entities.