LeetCode Solution, Medium, 1663. Smallest String With A Given Numeric