STACK AND QUEUE ("Real Life Examples")

 
-2
 

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

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

Example:
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 :)

Featured Replies in this Discussion

  • 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.
 
0
 

This is an assignment for you to do, so do your own damn homework.

 
0
 

This is an assignment for you to do, so do your own damn homework.

Seconded.

 
1
 

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.

Comments
Sorry you missed the chess tournament.
 
0
 

image a stack as a pile of plates requiring washing in a resturant kitchen

 
0
 

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

 
0
 

stack- a stack of books
queue- a print queue, a bus queue

 
0
 

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.

 
0
 

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.

 
0
 

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.

 
0
 

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.

 
-1
 

4 years old post...

 
0
 

check this out for more info on queue data structure
http:\ba-programmer.blogspot.com

 
0
 

For Queue(FIFO)-inbox messages in our mobile phone.

 
0
 

Can i get real life example of stack for making simulation

 
0
 

Plz give some example of real life in which data structure are use

 
0
 

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
Program2Do

You
Post:
Start New Discussion
View similar articles that have also been tagged: