could anyone describe to me how to implement a stack using two queues. just cant get my head round it.thanks to anyone who helps.
whatsgoin'on
0
Newbie Poster
Recommended Answers
Jump to PostIt takes about five minutes to figure out. Just take a few coins and use queue-like operations to simulate the pushing and popping of a stack. The nice thing about stacks and queues is that the concepts are so simple you can easily diagram them with minimal effort.
All 2 Replies
Reply to this topic
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.