Given an integer n, return the count of all numbers x with unique digits such that 0≤x<10n0 \le x < 10^n0≤x<10n.
n
x
Constraints:
0≤0 \le0≤ n ≤8\le 8≤8
Now, let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Count Numbers with Unique Digits
For the input n = 1, what is the output?
n = 1
999
101010
111111
111
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Implement your solution in the following coding playground.