From: Tagore on
Hi,

I am making a message application where I need to sort and partition
messages according to sender names.
All my message records are stored in a large array.
I am looking for an in-place and stable sorting algorithm which can
serve my purpose.

Thanks,
From: Richard Heathfield on
Tagore wrote:
> Hi,
>
> I am making a message application where I need to sort and partition
> messages according to sender names.
> All my message records are stored in a large array.
> I am looking for an in-place and stable sorting algorithm which can
> serve my purpose.

qsort will do it; simply specify sufficient key to guarantee stability
(e.g. add a record number or something).

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
From: Stuart Golodetz on
Tagore wrote:
> Hi,
>
> I am making a message application where I need to sort and partition
> messages according to sender names.
> All my message records are stored in a large array.
> I am looking for an in-place and stable sorting algorithm which can
> serve my purpose.
>
> Thanks,

If you're using C++, try std::stable_sort.

Cheers,
Stu