logo
Interview
    Interview Guide
    Coding Problems List
Sponsored: Coursera
Problems

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

Online Judge