Improving QuickSort Modify the given implementation of the QuickSort algorithm so that it works fast even on sequences containing many identical elements.