Quicksort Algorithm Optimization
A student needs to modify a standard quicksort algorithm to handle nearly-sorted data more efficiently. Which modification would be most effective?
A
Implement a pivot selection strategy that chooses the median of three random elements
B
Increase the recursion depth limit
C
Switch to bubble sort for nearly-sorted data
D
Always select the first element as the pivot
Question Leaderboard
Not enough data yet to show leaderboard.
APFIVE