1.11M Members

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

 
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.

 
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.

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