[LeetCode] Numbers At Most N Given Digit Set

1 · · March 21, 2022, 3:24 p.m.
902. Numbers At Most N Given Digit Set Given an array of digits which is sorted in non-decreasing order. You can write numbers using each digits[i] as many times as we want. For example, if digits = [‘1’,’3’,’5’], we may write numbers such as ‘13’, ‘551’, and ‘1351315’. Return the number of positive integers that can be generated that are less than or equal to a given integer n. ...