Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Challenge: Priority Queuing
#1
This is a fun little program that can be done in about 20 lines of code.

PURPOSE:
Given a queue of 4 entries, let the user select one of the entries to be moved to the top of the queue, rearranging all the other entries accordingly.

STARTING QUEUE...: 1 2 3 4
User selects #3.
UPDATED QUEUE....: 3 1 2 4
User selects #1.
UPDATED QUEUE....: 1 3 2 4
User selects #1.
UPDATED QUEUE....: 1 3 2 4 (the same, #1 was already at top)

You'll love it!
*****
Reply


Messages In This Thread
Challenge: Priority Queuing - by Moneo - 07-04-2003, 11:52 PM
um - by Meg - 07-05-2003, 12:38 AM
To Meg: - by Moneo - 07-05-2003, 02:11 AM
Challenge: Priority Queuing - by oracle - 07-05-2003, 05:11 AM
Challenge: Priority Queuing - by Moneo - 07-05-2003, 05:28 AM
Challenge: Priority Queuing - by oracle - 07-05-2003, 05:36 AM
To Oracle: - by Moneo - 07-05-2003, 05:57 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)