solution to Reverse Integer