Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

queue

Posted on 2000-04-25
5
Medium Priority
?
310 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 30 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

Industry Leaders: 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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

721 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