Bank Neo Commerce interview question

I was asked to reverse an integer