Given a positive integer , return the number of positive integers in that have all distinct digits. For : integers - are all special (single digit or "10"). Integers -: only has repeated digits.
Answer: . For : you need to count all numbers up to where no digit repeats. This requires tracking which digits you've used. Before reading the solution, try to identify the base case and recursive relationship yourself.