Using the median-of-three method , select a pivot to use to quicksort the following array:
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The first element is 12, the middle element is 47, and the last element is 1. The median of these three numbers is 12.