1,105,384 Community Members

STACK AND QUEUE ("Real Life Examples")

Member Avatar
playagain
Newbie Poster
4 posts since May 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
-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 :)

Member Avatar
Rashakil Fol
Super Senior Demiposter
2,596 posts since Jun 2005
Reputation Points: 982 [?]
Q&As Helped to Solve: 209 [?]
Skill Endorsements: 42 [?]
Team Colleague
 
0
 

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

Member Avatar
TheGathering
Junior Poster
102 posts since Jul 2007
Reputation Points: 12 [?]
Q&As Helped to Solve: 10 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Seconded.

Member Avatar
Hamrick
Posting Whiz
322 posts since Jun 2007
Reputation Points: 150 [?]
Q&As Helped to Solve: 35 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
jbennet
Moderator
17,127 posts since Apr 2005
Reputation Points: 1,618 [?]
Q&As Helped to Solve: 736 [?]
Skill Endorsements: 38 [?]
Team Colleague
Featured
 
0
 

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

Member Avatar
rads99
Newbie Poster
1 post since Mar 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
Tirana
Newbie Poster
1 post since Oct 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
BestJewSinceJC
Posting Maven
2,760 posts since Sep 2008
Reputation Points: 700 [?]
Q&As Helped to Solve: 366 [?]
Skill Endorsements: 17 [?]
 
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.

Member Avatar
jingle_br
Newbie Poster
11 posts since Oct 2009
Reputation Points: 1 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
sahaana_revathi
Newbie Poster
1 post since Sep 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
india_citizen
Newbie Poster
1 post since Oct 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
Taywin
Posting Maven
2,632 posts since Apr 2010
Reputation Points: 134 [?]
Q&As Helped to Solve: 378 [?]
Skill Endorsements: 17 [?]
 
-1
 

4 years old post...

Member Avatar
B
Newbie Poster
1 post since Apr 2014
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
vinothinikumar
Newbie Poster
1 post since Apr 2014
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

You
Post:
Start New Discussion
Tags Related to this Article