At 04:14 PM 6/10/01 +0900, Hal E. Fulton wrote:
>One big source of inefficiency is my using a sort inside a loop,
>sorting an array with each iteration (even though the "right" way
>is to insert the new item at the appropriate location and not call
>sort).

Better yet, you could use a tree instead of an array - once implemented, it 
would take care of inserting the element at the right place and would do it 
in logarithmic time instead of linear...

Bye,
         Luigi