find the extremum element in the array