Reverse Integer
Problem
Reverse digits of an integer. Returns 0
when the reversed integer overflows (signed 32-bit integer).
Example
Given x = 123
, return 321
Given x = -123
, return -321
Reverse digits of an integer. Returns 0
when the reversed integer overflows (signed 32-bit integer).
Given x = 123
, return 321
Given x = -123
, return -321