Medium
Given a signed 32-bit integer x, return x with its digits reversed. If reversing causes the value to fall outside the 32-bit signed range [-2^31, 2^31 - 1], return 0.
Input: x = 123 Output: 321
Input: x = -123 Output: -321
Input: x = 120 Output: 21