A program that finds the maximal values of a data set in nlgn time