Hacker News new | past | comments | ask | show | jobs | submit login

Generally it is preferable to choose the pivot randomly.



Sure, and the wikipedia page makes mention of that. But it's not super relevant to the point I'm making about the worst-case complexity of quick sort (which is often misunderstood to be O(n^2)).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: