To find the largest and smallest in a given set of numbers