Pergunta de entrevista da empresa Microsoft

Design and algorithm, give int 1 return int 2, and int 2 return int 1.