Given an array of strings digits representing a sorted set of unique digits, and an integer n, return the count of positive integers that can be generated using only digits from digits such that each generated integer is less than or equal to n.
Digits from digits may be reused any number of times when constructing an integer.
Constraints:
digits.length
digits[i].length
digits[i] is a digit from $'1'$ to $'9'$
All the values in digits are unique
digits is sorted in nondecreasing order
n
Given an array of strings digits representing a sorted set of unique digits, and an integer n, return the count of positive integers that can be generated using only digits from digits such that each generated integer is less than or equal to n.
Digits from digits may be reused any number of times when constructing an integer.
Constraints:
digits.length
digits[i].length
digits[i] is a digit from $'1'$ to $'9'$
All the values in digits are unique
digits is sorted in nondecreasing order
n