Efficiently find the median of a collection of numbers by using the "median of medians" algorithm. Also find the nth highest or smallest element in that collection.