Hi everybody;
I just started to learn stacks. How can I count the number of Items in a stack by using ADT stack operations?? Can u help me?
thehakan 0 Newbie Poster
Recommended Answers
Jump to PostWhat operations do you have available? If you can only use push, pop, and empty then you're stuck with removing every item until the stack is empty and counting them. Any decent stack implementation will provide you with some form of size operation that will tell you how many items …
Jump to Post>empty auxiliary stacks are available.
Getting information out of you people is like pulling teeth. Did you know that? I'll assume that you can only use push, pop, and empty. In that case, pop every item in the stack, increment a counter and push that item onto a second stack. …
All 5 Replies
Narue 5,707 Bad Cop Team Colleague
thehakan 0 Newbie Poster
Narue 5,707 Bad Cop Team Colleague
Rashakil Fol 978 Super Senior Demiposter Team Colleague
thehakan 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.