Morgan Stanley interview question

Reverse an Int