add entry at bottom of stack in lieu of top, in real project you may never need it.
ithelp
Nearly a Posting Maven
2,230 posts since May 2006
Reputation Points: 769
Solved Threads: 128
Erm, stacks and queues are very useful, very basic, and very well-used data structures. To clarify what mohanrobin said:
For a stack, you have a list that you can add items to and remove items from, but only to or from the end (or "top") of the stack.
A queue is basically a stack, except that you can add and remove items from either end.
So it is fairly easy to implement one in terms of the other. Why don't you post some code and/or homework requirements and we'll see if we can't help you further.
[EDIT] BTW. There are "similar threads" down at the bottom of the page that list a whole bunch of stuff about stacks and queues in C.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229
i`ve a question regarding stack and queue...
So start your own thread, don't hijack someone else's thread.its as to implement queue and stack on these
data: 23,34,56,67,89,90
using linklist....can anyone tell me how to begin..
Read the rules and other important sticky posts, make your own thread, and tell us which you want -- stack, queue, or linked list.Erm, What the heck is anerm?
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
> What the heck is an erm.
:$ Oh, urgh, um... Exchange Rate Mechanism, Enterprise Resource Management, Erase Reserved Memory, Electronic Rodent Monitoring, Earth Resistance Meter, uh...
:)
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229
> What the heck is an erm.
:$ Oh, urgh, um... Exchange Rate Mechanism, Enterprise Resource Management, Erase Reserved Memory, Electronic Rodent Monitoring, Earth Resistance Meter, uh...
:)
Oh, of course. I thought I was averbal expression that has no place in writing. Silly me! :icon_wink:
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
Actually, though, you are right. I've a bad habit of doing that. I don't imagine it to be very understandable to people for whom English is a second language. I'll try to desist. :sweat:
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229