7. Reverse IntegerMedium
Given a signed 32-bit integer
x
, returnx
with its digits reversed. If reversingx
causes the value to go outside the signed 32-bit integer range[-2
31
,-2
31
- 1]
Assume the environment does not allow you to store 64-bit integers (signed or unsigned).
- Problem
- Solutions