Solved

queue

Posted on 2000-04-25
5
296 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Building cUrl in Windows v7.43.0 4 36
C language IDE – Compilers installation 14 75
Getting IP address 8 89
How do I get Window Title of all opened process? 4 12
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

856 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