Solved

queue

Posted on 2000-04-25
5
301 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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…
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 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.

623 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