Given an integer n, return the count of all numbers with unique digits, x, where 0 <= x < 10n.
2 => 9 => 100 - 9 3 =>
111,122,133,144,155,166,177,188,199
121
It's a combinations?
Yep, it have a formula to calculate it.
f(k) = 9 * 9 * 8 * ... (9 - k + 2)
for the fixed position. And for each k, we need to sum 1...k.
Celever solution!