Simply reverse the decimal digits one by one.

Hardcode 32-bit limitation to meet overflow requirement.

```
class Solution(object):
def reverse(self, x):
res, remains = 0, abs(x)
while remains:
res, remains = res*10+remains%10, remains//10 # Updated thanks to Pythonaaron
if x < 0: res *= -1
return res if abs(res) < 0x7fffffff else 0
```