Re: sort a generic linked list?
- From: Peter Sestoft <sestoft@xxxxxxxxxxx>
- Date: 29 Jan 2007 21:15:54 +0100
"Michael A. Covington" <look@xxxxxxxxxxxxxxxxxxxxxx> writes:
Linked lists are inherently not sortable without a lot of extra work
linking and unliking things. Arrays are very sortable.
Well, as pointed out also by Jon Skeet, linked lists can be sorted
using mergesort in worst-case time O(n log n), without extra memory,
and stably (not changing the order of equal elements). In many
respects this provides better functionality than quicksort on arrays.
The C5 collection library for C#/.NET has such an sorting
implementation for linked lists; http://www.itu.dk/research/c5/
Peter
.
- References:
- sort a generic linked list?
- From: Nick Valeontis
- Re: sort a generic linked list?
- From: Gaurav Vaish \(www.edujini-labs.com\)
- Re: sort a generic linked list?
- From: Michael A. Covington
- sort a generic linked list?
- Prev by Date: C# Developers needed in Houston Texas
- Next by Date: Re: Dynamic cast with generics
- Previous by thread: Re: sort a generic linked list?
- Next by thread: default-values to class members
- Index(es):
Relevant Pages
|