Enroll and Be Sorted

in the 2003 AI Olympics

The QuickSort-
-ing Hat.

Oh you may not think I'm linear but don't partition on what you see.
I'll swap myself if you can find a quicker hat than me.
There's nothing hidden in your head that the quick-sorting hat can't see.
So try me on and I will tell you where your pivot ought to be.