Algorithm · Expedia · Medium
You are provided a string pattern that may contain digit characters ('0' to '9') and the wildcard symbol '?'. Additionally, two integer values are given: targetSum and maxVal. Each occurrence of '?' in the string must be substituted with a single digit between 0 and maxVal (inclusive). Digits already present in pattern are locked and are not subject to the maxVal limit. Construct and return every possible string that results from replacing all '?' characters, such that the…
Checking your access…