Question d’entretien chez Clearwater Analytics (CWAN)

Write a method that accepts an integer and then returns an integer with the digits reversed. For example, if the integer 123 is passed in, the integer 321 is returned.

Réponse à la question d'entretien

Utilisateur anonyme

29 sept. 2011

It was an interesting intellectual problem but a terrible example of what a software engineer should do. If I had a boss that told me to solve a problem like this, I would tell him to go home and sober up because only a drunk man thinks like this. I answered it using mod 10 and div 10 functions to pull each number off and then reassemble the reversed number.