Start New Discussion within our Computer Science Community

Please help me to build a list of examples of stack and queue in real life situation...

The object concerned must only one object.
And the object must be tangible.

Queue (FIFO): The bullet in a machine gun..(you cannot fire 2 bullets at the same time)
Stack (LIFO): The tennis balls in their container.. (you cannot remove 2 balls at the same time)

Please help me I need more examples..
At least 10 examples

TNX :)

For a queue just think of stuff where something goes in one end and out the other in order. For a stack just think of stuff where something goes in one end and out the same end in order.

Sorry you missed the chess tournament.

Hi example for queue can be Queue for booking movie tickets (FIRST IN FIRST OUT)

Routers can use queues. I'd elaborate but if you want to use it as an example, it'll force you to research it first to figure out the correct terminology/phrasing for an example.

You can use the billing counter as an example. The first person on the line gets the chance to pay first so he comes out of the counter first.

Real life examples of queue are: 1. A queue of people at ticket-window: The person who comes first gets the ticket first. The person who is coming last is getting the tickets in last. Therefore, it follows first-in-first-out (FIFO) strategy of queue.
2. Vehicles on toll-tax bridge: The vehicle that comes first to the toll tax booth leaves the booth first. The vehicle that comes last leaves last. Therefore, it follows first-in-first-out (FIFO) strategy of queue.
3. Phone answering system: The person who calls first gets a response first from the phone answering system. The person who calls last gets the response last. Therefore, it follows first-in-first-out (FIFO) strategy of queue.
4. Luggage checking machine: Luggage checking machine checks the luggage first that comes first. Therefore, it follows FIFO principle of queue.
5. Patients waiting outside the doctor's clinic: The patient who comes first visits the doctor first, and the patient who comes last visits the doctor last. Therefore, it follows the first-in-first-out (FIFO) strategy of queue.

if many processes are waiting for CPU time , then processes are made to wait in a queue. they get the cpu time acc to fifo order or first come first serve.

check this out for more info on queue data structure

Stack is a linear data structure in which item insertion or deletion takes place at only one place called TOP.
Stack is also called as LIFO or restricted list.
What is LIFO ?

LIFO - Last In First Out
It is the principle which specifies that the data item that is inserted last into the stack is the first one to be deleted from the stack.

Example :

Stacks in data structures
We can relate stacks to some real life objects and situations, as you can see in the picture of stack of books,
One can add a new book to an existing stack of books only at its top and no where else. Similarly a book cannot be added in the middle of the stack so one has to remove all the books above to add a new book at desired place.

For more information and programs on stacks and explanation visit

pls i wanted to know the practical examples of stack in computer field , and not like plates, books...blah....blah...