Company: ibm_13oct
Difficulty: medium
Minimum Transformation Cost Problem Description Given two strings s and t , determine the minimum total cost required to transform s into t using the following operation any number of times, including zero: Select an index i such that 0 . Remove the character at index i . Concatenate the remaining characters in order. The step costs i units. If the transformation is not possible, return -1 . Examples Example 1: Input: s = "abcec", t = "aba" Output: 6 Explanation: The underlined character is removed in the step. Transformation Steps Step | s before | Step (0-based indexing) | Cost | s after -----|----------|-------------------------|------|-------- 0 | abcec | Choose the index i = 3 | 3 | abec 1 | abec | Choose the index i = 3 | 3 | abe Example 2: Input: s = "abcde", t = "acf" Output: -1 Explanation: It is not possible to match the 'f' in t. Constraints 1 Strings s and t contain only lowercase English letters. long getMinimumCost(string s, string t) { // Complete the 'getMinimumCost' fu