Re: Fast Sort Linked List Of Strings
- From: Jeremiah D. Seitz <jseitz@xxxxxxxxxxxxxxxxx>
- Date: Thu, 06 Mar 2008 19:07:26 -0500
On Thu, 6 Mar 2008 13:14:03 -0800, Lorin
<Lorin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Would someone point me at a snippet showing how to do a proper fast sort on a
linked list of strings? yes strings. and by proper i mean justified (or
whatever you would call it). i.e. 22 comes before 219
I think I can figure out out to create the linked list sorted, but not
sorting after the list is filled.
And it is too big to fill one list then sort fill another linked list.
32K items and yes, I need to hold it all in memory.I currently have an array class to do this, but the linked list should be
faster for some operations - e.g. remove, insert into middle of list.
Have you considered the idea of keeping the string array, and just
swapping the pointers? Removing and inserting can be made much faster
by using CopyMemory, with no need for a linked list.
J.
Jeremiah D. Seitz
Omega Techware
http://www.omegatechware.net
.
- Prev by Date: Re: reading mouse wheel rotation in VB6
- Next by Date: Re: Passing and Returning Arrays from Function
- Previous by thread: Passing and Returning Arrays from Function
- Next by thread: Re: Determine cursor location in cell of FlexGrid
- Index(es):
Relevant Pages
|