Sum of Number and Its Reverse
Given a non-negative integer num, return true if num can be expressed as the sum of any non-negative integer and its reverse, or false otherwise.
When a number is reversed, it may have leading zeros.
Example 1
Input
num = 443Output
true172 + 271 = 443, so the number can be expressed as a non-negative integer plus its reverse.
Example 2
Input
num = 63Output
false63 cannot be expressed as the sum of a non-negative integer and its reverse.
Constraints
- 0 <= num <= 10^5