Assignment task: Quicksort.
You have a set of N distinct nuts and N distinct bolts, such that each nut has a unique matching bolt; given a pair (a, b) where a is a nut and b is a bolt, you can test them to check whether a is smaller, larger, or a match for b. Describe an efficient algorithm to match all the nuts to their bolts, and extimate its Big Oh() performance. Hint: use bolts as pivots for nuts and vice-versa.