Pregunta de entrevista de Amazon

They asked me to Reverse an integer