Re: [CODE] Priority Queues :: HowTo?

From: George Greer (
Date: 02/11/02

On Mon, 11 Feb 2002, Justin Adler wrote:

>   I'm trying to impliment a list of rooms. The list is a fixed size
>(lets say 1000 rooms max). The list needs to be prioritised, becuase i
>would like the most 'important / common' rooms being near the head (ie.
>Highest priority), while the least most common rooms down the end of the

I suppose the question is, "why do you want common rooms at the head?" Is
the current behavior of at-worst 11 searches (10.8765 for 1,880 rooms)
across the world array too slow for some reason?  Is a hash table not
feasible?  Why not just pass around 'room_data *' instead of all virtual

It all depends on why you're trying to do what you're trying to do.  You
gave us an algorithm for the solution to a problem we don't know.

George Greer

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT