What's interesting is that an algorithm is presented as correct, but which blows up to quadratic behavior given the right input, and since since quicksort uses than tail recursion, could potentially cause a stack overflow. Thus you have a correct, safe algorithm in theory but not in practice.