LeetCode 902: Numbers At Most N Given Digit Set
Problem Restatement We are given: A set of allowed digits as strings. An integer n . We may use the given digits any number of times to build positive integers. We need to count how many numbers are less than or equal to n . For example: digits = ["1", "3", "5", "7"] n = 100 Valid numbers include: 1, 3, 5, 7, 11, 13, 15, 17, 31, 33, ......