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

> I have seen many people use quicksort in situations where the worst case either occurs quite often or can be easily caused by an attacker to occur

Isn't the pivot point in standard quicksort randomized? If so, how can there exist cases where an input will often hit the worst case? Are there attacks that work without having to predict the PRNG?

Of course if you know something about your data, there are often faster ways of sorting it, but that doesn't seem to be the complaint rendered.




> Isn't the pivot point in standard quicksort randomized?

Quicksort isn't standardized. Randomization is a common approach, both then so are median of 5, middle and first datums.




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

Search: