Company: Salesforce_10_feb
Difficulty: medium
Salesforce Workflow Configuration Description Given a Salesforce workflow configuration string config consisting of digits (0-9) and placeholders (?), determine the number of ways the placeholders can be replaced with digits (0-9) such that no two adjacent workflow steps (digits) are the same. Note: Since the answer can be very large, return the answer modulo (10 9 + 7). Example Given the workflow configuration string config = "1?3?" : The first placeholder ( ? ) can be replaced with 8 possible digits: {0, 2, 4, 5, 6, 7, 8, 9} (all digits except the adjacent 1 and 3). The second placeholder ( ? ) can be replaced with 9 possible digits: {0, 1, 2, 4, 5, 6, 7, 8, 9} (all digits except the adjacent 3). This results in a total of 8 * 9 = 72 possible configurations. Since the total number of configurations may be very large, return the result modulo (10 9 + 7). Function Description Complete the function getWorkflowReplacements in the editor below. getWorkflowReplacements has the following pa