Talk:Priority queue: Difference between revisions
Content added Content deleted
(→Refinement: I wanted a demo!) |
(Add actions?) |
||
Line 15: | Line 15: | ||
:: If you're going to specify an algorithm, you end up ruling out the use of library code because you can't easily ''show'' that the library code is using the algorithm. I wanted to suggest a demonstration element to the task that would allow the key operations you mentioned in your initial draft to be used in a “natural” way. Yes, there probably ought to be some interleaving between gets and puts, but I can't be bothered right now to conceive of how to write that many tasks down. :-) I hate it when a task is just “here is some code”; I want to be able to run it for myself (and, of course, tinker with it for my own ends). –[[User:Dkf|Donal Fellows]] 13:29, 4 August 2011 (UTC) |
:: If you're going to specify an algorithm, you end up ruling out the use of library code because you can't easily ''show'' that the library code is using the algorithm. I wanted to suggest a demonstration element to the task that would allow the key operations you mentioned in your initial draft to be used in a “natural” way. Yes, there probably ought to be some interleaving between gets and puts, but I can't be bothered right now to conceive of how to write that many tasks down. :-) I hate it when a task is just “here is some code”; I want to be able to run it for myself (and, of course, tinker with it for my own ends). –[[User:Dkf|Donal Fellows]] 13:29, 4 August 2011 (UTC) |
||
:::I mentioned algorithms in a generic sense - not specific to this task, but as a part of the problem in adding any requirement for execution speed to the task. --[[User:Paddy3118|Paddy3118]] 16:17, 4 August 2011 (UTC) |
|||
How about asking to demonstrate the following actions on the queue, where a Pop action is presumed to display what has been popped? |
|||
'''Action''' '''Priority''' '''Task''' |
|||
Add 3 Clear drains |
|||
Add 4 Feed cat |
|||
Add 5 Make tea |
|||
Pop1 |
|||
Add 1 Solve RC tasks |
|||
Add 2 Tax return |
|||
PopTillEmpty |
|||
--[[User:Paddy3118|Paddy3118]] 16:17, 4 August 2011 (UTC) |