News for hackers. Stuff that matters.
Re:Ask HN: What is the most beautiful piece of code you've e... by lordfoom on Monday October 28, 2019 @11:14AM (#21377696)
> Quick sort comes with a steep penalty. Worst case is O(n^(2)). The reason quicksort is good is because it's in place. Once you throw away the in place aspect of quick sort, it's straight up bad.

That's why you shuffle the list before you sort it :)

There are no comments on this comment yet.