News for hackers. Stuff that matters.
Re:American Flag Sort by hinkley on Tuesday April 23, 2024 @09:49PM (#40139541)
I’m not calling it flag sort.

It’s an in-place bucket sort which is interesting.

Re:American Flag Sort by wodenokoto on Wednesday April 24, 2024 @01:21AM (#40140870)
From Wikipedia[1]:

> The name American flag sort comes by analogy with the Dutch national flag problem[2] in the last step: efficiently partition the array into many "stripes".

[1] https://en.m.wikipedia.org/wiki/American_flag_sort

[2] https://en.m.wikipedia.org/wiki/Dutch_national_flag_problem

Re:American Flag Sort by hinkley on Wednesday April 24, 2024 @03:09AM (#40141529)
I read this rationale before I made my comment.
Re:American Flag Sort by kleiba on Wednesday April 24, 2024 @01:42PM (#40147448)
> From Wikipedia[1]:

...or from the very article itself...

Re:American Flag Sort by remram on Wednesday April 24, 2024 @10:44AM (#40144992)
Or in-place radix sort maybe.

I agree with you, the name is ridiculous, reminds me of miracle sort or intelligent design sort: https://www.dangermouse.net/esoteric/intelligentdesignsort.h...

Probably those two flag sort algorithms were named before the joke algorithms were popularily known.