stack

R

raghu

What is a stack of stack? Can anyone please give me the idea to
implement it....

Thanks a lot...

Happy New Year

Regards,
Raghu
 
O

osmium

raghu said:
What is a stack of stack? Can anyone please give me the idea to
implement it....

Try an analogy. You know what an array of doubles is. How about an array
of structures? That still makes sense. You could have an array in which
each element is a stack. Likewise, you can have a stack in which each
element is a stack. And each element of the "innermost" stack could be an
doubles. Or structures or whatever.

So the crucial thing is to distinguish between elements and combinations of
elements.
 
C

Chris Dollin

raghu said:
What is a stack of stack?

At a guess, a stack whose elements are stacks (more
likely pointers to stacks).
Can anyone please give me the idea to
implement it....

Implement a generic stack type. Now stack stacks into it.

For generic stacks you probably want, given that we're in C,
a stack of generic /pointers/. So your generic stack will
use void* pointers to its contained objects. See, I made
it topical.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,610
Members
45,255
Latest member
TopCryptoTwitterChannels

Latest Threads

Top