Pergunta de entrevista da empresa Amazon

They asked me to Reverse an integer