7 reverse Integer
Reverse digits of an integer. Returns 0 when the reversed integer overflows (signed 32-bit integer).
Example
Givenx = 123
, return321
Givenx = -123
, return-321
Last updated
Reverse digits of an integer. Returns 0 when the reversed integer overflows (signed 32-bit integer).
Example
Givenx = 123
, return321
Givenx = -123
, return-321
Last updated