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
8000 yields0008 , which is simply treated as8 .
Constraints:
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
8000 yields0008 , which is simply treated as8 .
Constraints: