in reply to Re: Bitten by the worst case (or why it pays to know whats inside the black box)
in thread Bitten by the worst case (or why it pays to know whats inside the black box)

it's just counterintuitive to shuffle an array before sorting it.

And yet this is what many quicksort implementations do by default in order to avoid the worst case. But you are correct, Ill add a comment explaining the purpose of the shuffle so that it doesnt cause any confusion later on. Thanx for suggestion.


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi


  • Comment on Re^2: Bitten by the worst case (or why it pays to know whats inside the black box)