Pergunta de entrevista da empresa Swimm

Algorithm code question, saving min and max out of a data structure.