Reverse the Numeric Token

Reverse the decimal digits of the signed integer x. Keep its sign at the front and discard zeroes that become leading after reversal. Return 0 when the reversed value is outside [-2147483648, 2147483647]. Use arithmetic digit extraction, not text conversion, and prevent overflow before each append.

Examples
Input: 804
Output: 408
Hints

Reverse the Numeric Token

Reverse the decimal digits of the signed integer `x`. Keep its sign at the front and discard zeroes that become leading after reversal. Return `0` when the reversed value is outside `[-2147483648, 2147483647]`. Use arithmetic digit extraction, not text conversion, and prevent overflow before each append.