Title: Message
I'm not implementing the bubble sort.  I could have used a TList.  It would be a bit faster, but for much less code, I used a TStringList to do the sort, created a new temporary array in the sorted order, then copied the memory contents over the top of the original array.  Works well.  I wanted the array sorted without mucking around with established bug-free code which uses the array.
 
Ross.
----- Original Message -----
Sent: Thursday, May 27, 2004 4:28 PM
Subject: RE: [DUG] dynamic array items

I have not followed the discussion closely.
 
I just read bubble sort topic and thought why reinvent the whole wheel.
 
TList already has a method Sort which use QuickSort. QuickSort is better than bubble sort.
 
All you need to do is just offer a method TListSortCompare to compare the item in the list.
 
Delphi version 7
 
Regards
Leigh
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to