I was recently asked this question in an interview:
There are two arrays of size \'n\' each. One array has nuts, the other one has bolts. Each nut fits exactly one bolt
For formal analyses (including quicksort) see http://www.wisdom.weizmann.ac.il/~naor/PUZZLES/nuts_solution.html and http://compgeom.cs.uiuc.edu/~jeffe/teaching/algorithms/notes/05-nutsbolts.pdf