4 ms·
The quicksort example seems oddly named, I would have called it "unique" or "removeDuplicates". If you change one of the inequalities, say ">" to ">=", then it
by omaranto 10y ago
The quicksort example seems oddly named, I would have called it "unique" or "removeDuplicates".
If you change one of the inequalities, say ">" to ">=", then it does sort (without removing duplicates). It still wouldn't feel fair to call it "quicksort" because it isn't in place.