Blitz (27/218)

From:Dan Arico
Date:4 Aug 2001 at 04:16:35
Subject:Re: sort and sortlist

On 03-Aug-01, amorel wrote:
> On 04-Aug-01, Steve Hargreaves wrote:
>
> I can only answer a few questions.
>
> C=be freed when the statement exits). Alternatively, is there any
> way to free a
> C=standard array so that it can be re-dimmed once it's been
> declared?
>
> I figure dim arrayname(0) would do the trick.
>
> C=3) Write my own sort routine - something I'm loathe to do.
> Besides, I've only
> C=ever done a bubble sort, and I'm sure it could be done quicker.
>
> I thought bubblesort is already fairly quick. iirc There`s a sort
> source on aminet showing some sort routines. Check that out, it had
> at least one very fast routine. It shows graphically how fast too.

It's actually a fairly slow sort. Its efficiency drops off extremely
fast once you get more than a few elements in the list.

If one item at a time is being added, a tree would probably be a lot
more efficient, but it's going to involve using pointers in some
fashion to accomplish the task.

The best reference I've got on the subject is Sorting and Searching by
Knuth. It's Volume III of a set called The Art of Computer
Programming.

Dan Arico



There is no difference between an income tax and slavery. A slave does
not own the fruits of his labor, and neither does anyone who is
subject to income tax.

Former Asst. Treasury Secretary Paul Craig Roberts

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie