extremes function

Maxima and Minima