Given a range [L, R] and a set of allowed digits, count how many integers in the range consist only of those digits. For example, if the set is {1, 2}, valid numbers include 1, 2, 11, 12, 21, 22, etc.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.