Add QuickSort versions optimized for duplicates