LeetCode
Reverse Integer
Click
here
for an explanation.