How Can I Sort a Doubly Linked List Queue?

Reply

Join Date: Feb 2005
Posts: 21
Reputation: compshooter is an unknown quantity at this point 
Solved Threads: 0
compshooter's Avatar
compshooter compshooter is offline Offline
Newbie Poster

How Can I Sort a Doubly Linked List Queue?

 
0
  #1
Apr 19th, 2005
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!
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,576
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 709
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

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

 
0
  #2
Apr 19th, 2005
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?
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 21
Reputation: compshooter is an unknown quantity at this point 
Solved Threads: 0
compshooter's Avatar
compshooter compshooter is offline Offline
Newbie Poster

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

 
0
  #3
Apr 20th, 2005
That would probably be the easiest way. Thanks for the quick reply!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC