Pregunta de entrevista de SolarWinds

find max and min in array with O(1) time complexity