Given a non-negative integer n, return the number formed by reversing its digits (leading zeros are dropped naturally). Conceptually, push each digit onto a stack and pop them to build the reversed number. The input is JSON {n}.
Input: JSON {n}.
Output: Integer — the digits of n reversed.
Input: {"n":123}
Output: 321
Explanation: Digits reversed.Input: {"n":120}
Output: 21
Explanation: Trailing zero becomes leading and is dropped.Input: {"n":0}
Output: 0
Explanation: Zero reversed is zero.0<=n<=10^9