Solved

queue

Posted on 2000-04-25
5
297 Views
Last Modified: 2011-09-20
A, B and C are inserted into a queue, what could be the order of removal for this queue?
0
Comment
Question by:beachbumm
  • 3
  • 2
5 Comments
 

Author Comment

by:beachbumm
ID: 2747869
Adjusted points from 5 to 10
0
 
LVL 22

Expert Comment

by:nietod
ID: 2747926
We cannot provide answers to school assignments.  That is grounds for removal from this site.  (for both you and the experts involved.)  We can provide only limitied help in accademic assignments.    We can answer specific (direct) questions, like you might ask your teacher.  We can review your work and post suggestions, again, like your teacher might do.

Do you have specific questions?
Do you have any work on this (incomplete even) that we can review?
0
 

Author Comment

by:beachbumm
ID: 2748339
First I would like to comment on this by saying this is a not a school assignment. I am 30 years old and am not in school by far! I am trying to teach myself programming in the C language to apply this knowledge to someday write my own programs for the business I own. I am sure I will be posting more questions I come across that troubles me. It may have seemed that the question I posted was looked at like a school assignment and am sorry it was in this way. In the future I will try to phrase the questions better. Thanks and hope you can help me out in the future!
0
 
LVL 22

Accepted Solution

by:
nietod earned 10 total points
ID: 2748652
My applogies.     You may wish to expalin this (briefly) in future questions as  it is our official policy to not assist in cheating and because there are an overwhelming number of questions of that nature.

>> what could be the order of removal for this queue?
Its hard to say.

In most cases, queues are FIFO, which means First In First Out (same as accounting, since you own a business.)  So if you insert A, B, C, in that order, they should come out in the same order.  

However some queues may work differently.  Priority Queues allow items to be assinged a prioroty in some way and the itms are removed in order of their priority.  

Other queues, like the STL queue allow items to be removed in either FIFO or LIFO order as desired (i.e they even allow you to mix the order at times.)
0
 

Author Comment

by:beachbumm
ID: 2748742
after posting this question an example of priority queue came to mind. Take for example an emergency room at a hospital, more severe cases may get seen before previous cases as they arrive! thanks for your help
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
TCP/IP Socket - connection close results in data lost 14 152
Eclipse IDE - Cannot copy/paste from console output 8 314
FMX TCameraComponent Problem 2 92
C++ Code Issue 4 38
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question