[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Length-unaware sorting algorithm
- From: Lorenzo Donati <lorenzodonatibz@...>
- Date: Wed, 31 Aug 2016 06:01:24 +0200
On 26/08/2016 19:22, Martin wrote:
Mmmh "so almost any CS girl can implement it". This could sound a bit
sexist. There are a couple of smart girls on this list that probably
won't appreciate that.
On 16-08-25 08:58 PM, Coda Highland wrote:
On Thu, Aug 25, 2016 at 4:53 PM, Phil Bewig <firstname.lastname@example.org> wrote:
Heapsort, which I described above, doesn't need to know the length in
I believe the technicality is that it still has to have some notion of
a stopping point before you can start taking elements out if you
expect them to be in order.
Heapsort and insertion sort are similar in that they work on already
ordered part 1..m and adding new elements to keep that part ordered.
So if you are going to sort infinite sequence and want to see
intermediate results sorted - those are good algorithms. (Insertion sort
is simpler so almost any CS girl can implement it, heapsort is liked by
"old-school hackers" who like binary shifts and obscure and fast code.)