Question d’entretien chez Amazon

They asked me to Reverse an integer