473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

STACK AND QUEUE ("Real Life Examples")

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 :)
Jul 13 '07 #1
5 39787
pbmods
5,821 Expert 4TB
Heya, playagain.

The obvious example of a queue is... well, a queue. Such as at the DMV, except there, you only go in. Nobody ever comes out.

You're on the right track. What else have you come up with?
Jul 14 '07 #2
Heya, playagain.

The obvious example of a queue is... well, a queue. Such as at the DMV, except there, you only go in. Nobody ever comes out.

You're on the right track. What else have you come up with?
TNX TNX TNX


please give me some more examples
Jul 17 '07 #3
pbmods
5,821 Expert 4TB
I'll post one more (of each), but then you won't get any more until you post some examples that you have come up with.

An example of a stack, while we're on the subject of firearms, is a handgun magazine. Bullets get pushed in from the top, and they get popped out from the top.

An example of a queue is a carwash. Cars come out in the same order that they go in.
Jul 18 '07 #4
I had come up with this:

STACK: The batteries in flashlight
(You can not remove the second battery unless u remove the last in)

QUEUE: Drive-thru in MCDO
(You can not get your order unless the first one go away)

PLS GIVE ME MORE I NEED 10 examples for FRIDAY assginment :) :) :)
I need to finish this on Thursday night (which is tomorrow)

GODBLESS
Jul 18 '07 #5
JKing
1,206 Expert 1GB
Just a few from me.

Stack
Pringles! Last chip to go in the can is the first one in my stomach.
Clowns piling into a car that only has one door. Last clown in is the first one out.

Queue
Line at the grocery store
Print queue... Printers use queues for print jobs
Jul 19 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: King W.Wang | last post by:
Hi Java gurus, I've copied the following program from the book "Java by Examples". It compiles well with javac. But it does not run as expected. EXPECTED: It is expected that, when you input...
51
by: Noam Raphael | last post by:
Hello, I thought about a new Python feature. Please tell me what you think about it. Say you want to write a base class with some unimplemented methods, that subclasses must implement (or...
2
by: microsoft | last post by:
When I create a instance of web services proxy in winform, I get the exception. Stack Trace: System.ArgumentException: Item has already been added. Key in dictionary:"winbootdir" Key being...
13
by: baumann.Pan | last post by:
when define char *p = " can not modify"; p ='b' ;is not allowed, but if you declare p as char p = "can modify"; p = 'b'; is ok? why?
7
by: ben | last post by:
hello, an algorithm book i'm reading talks about the connectivity problem/algorithm. it gives a number of examples where the connectivity problem applies to real life situations (like, the...
7
by: unified | last post by:
Ok, I'm working on a program that is supposed to compare each letter of a string that is put into a stack and a queue. It is supposed to tell whether or not a word is a palindrome or not. (a...
1
by: Tyno Gendo | last post by:
Hi everyone I need to move on a step in my PHP... I know what classes are, both in PHP4 and 5 and I'm aware of "patterns" existing, but what I'm looking for are some real world projects eg....
3
by: Mark Shroyer | last post by:
I guess this sort of falls under the "shameless plug" category, but here it is: Recently I used a custom metaclass in a Python program I've been working on, and I ended up doing a sort of write-up...
4
by: lander | last post by:
I've read the page life cycle thing in msdn, still, i'm getting a bit confused of thinking how all the things are going under the hood... I know that when page loading, that the controls'...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.