You are here:

C/Data Structures

Advertisement


Question
Hello 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

Answer
Many 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

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Narendra

Expertise

I can answer questions in C related to programming, data structures, pointers and file manipulation. I use Solaris for doing C code and if you have questions related to C programming on Solaris, I will be able to help better.

Experience

6.5

Organizations belong to
Sun Microsystems

Awards and Honors
Brain Bench Certified Expert C programmer.
Advanced System Software Certified

©2012 About.com, a part of The New York Times Company. All rights reserved.