Quicksort - conditions that makes it stable
问题 A sorting algorithm is stable if it preserves the relative order of any two elements with equals keys. Under which conditions is quicksort stable? Quicksort is stable when no item is passed unless it has a smaller key. What other conditions make it stable? 回答1: Well, it is quite easy to make a stable quicksort that uses O(N) space rather than the O(log N) that an in-place, unstable implementation uses. Of course, a quicksort that uses O(N) space doesn't have to be stable, but it can be made