Reverse a 32-bit Integer
Asked at Keysight · Coding Questions · Difficulty: Easy
Implement a function to reverse a 32-bit signed integer. Return 0 if the reversed integer overflows. Pay special attention to retaining the sign of the number. Assume the input number is within the 32-bit signed integer range.
Loading the problem…