C/Data Structures
Expert: Narendra - 3/9/2004
QuestionHello Narendra Sir, I nagi reddy working as a Asst.Prof. in reputed Engineering College in India. my question is:
"What are multiple Stacks and Queues? how can we represent and what are the applications of these".
I hope you will help alot. If the answer is too big u just give the links that may contain about this topic.
thank u sir
nagireddy_y@yahoo.com
AnswerMany times terminologies create confusion!
I don't know what you actually mean by "Multiple Stacks/Queues"!!
1. It can mean "MANY" stacks and queues. If you know what is a stack/queue, then you can also extend it to many.....imagine the queues in Bangalore railway station. There will be many queues and you can stand in any of the queues to get tickets. Just for the sake of convinience single queue is divided into many, so that processing/service will be fast.
2. Also it can mean "Stack of Stacks", "Queue of queues", "Stack of queues" and "Queue of stacks".
We will take up the case of "Stack of Queues". Here, there is a stack with many elelments. And each of these elements on the stack are themselves queues having many other elements.
In this way, your question can be interpreted in many ways. Hope I have answered your question.
-Narendra