An implementation of Select as described in "An Introduction to Algorithms"