NewThe Learning module is now liveSee what's new

You are given a string pattern consisting of digit characters ('0' through '9') and wildcard characters ('?'). You are also given two integers targetSum and maxVal. Each '?' must be replaced by a single digit in the range [0, maxVal] (inclusive). Existing digit characters in pattern are fixed and are not constrained by maxVal.

Test Cases
Input
Output
Expected