Solved

queue

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now