Quicksort Algorithm Optimization
To improve the performance of a standard quicksort algorithm on nearly-sorted data, which modification is most effective?
A
Increase the recursion depth limit
B
Always select the first element as the pivot
C
Switch to bubble sort for nearly-sorted data
D
Implement a pivot selection strategy that chooses the median of three random elements
Question Leaderboard
Not enough data yet to show leaderboard.
