Picks a pivot element and partitions the array around it, recursively sorting the partitions.
Used for efficiency calculation in Stats Panel
Recursive call stack depth (avg log n, worst n)