A confusing number is a number that, when rotated 180 degrees, produces a valid yet different number.
Digits can be rotated
The digits
The digits
Given an integer n, return true if n is a confusing number, or false otherwise.
Note: Leading zeros in the rotated result should be ignored. For instance, rotating
yields , which is simply treated as .
Constraints:
n
A confusing number is a number that, when rotated 180 degrees, produces a valid yet different number.
Digits can be rotated
The digits
The digits
Given an integer n, return true if n is a confusing number, or false otherwise.
Note: Leading zeros in the rotated result should be ignored. For instance, rotating
yields , which is simply treated as .
Constraints:
n