944,015 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 7810
  • C RSS
Apr 19th, 2005
0

How Can I Sort a Doubly Linked List Queue?

Expand Post »
I have three doubly linked list queues and I need to sort them based on a variable that each object has namely its job length. I am attempting to code for a shortest job first processing program. I already have most of the program complete but now I need to sort the queues so the shortest jobs are first in line.

What would be the best/easiest/least amount of code way to sort these queues?

thank you!
Similar Threads
Reputation Points: 18
Solved Threads: 0
Newbie Poster
compshooter is offline Offline
21 posts
since Feb 2005
Apr 19th, 2005
0

Re: How Can I Sort a Doubly Linked List Queue?

The easiest way would be to maintain a sorted list as items are entered, then have the list take on queue behavior after all items have been entered. Is this a suitable solution?
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Apr 20th, 2005
0

Re: How Can I Sort a Doubly Linked List Queue?

That would probably be the easiest way. Thanks for the quick reply!
Reputation Points: 18
Solved Threads: 0
Newbie Poster
compshooter is offline Offline
21 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Can Someone please check my project & comment/tips
Next Thread in C Forum Timeline: Help using an Array





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC