Solution to reverse an integer

Solution to reverse an integer