Search
⌘K

Leetcode 1088. Confusing Number II

Count how many integers in [1, N] consist only of digits {0,1,6,8,9} and whose 180° rotation (mapping 0→0,1→1,6↔9,8→8) produces a different valid number. The common approach is to generate candidates via DFS/backtracking (pruning by N) and check that the rotated value is not equal to the original.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.