Pergunta de entrevista da empresa SolarWinds

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