Company: Test_1
Difficulty: medium
Minimum Cost to Transform String 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 = "abac", t = "aba" Output: 6 Explanation: The underlined character is removed in the step. Transformation Steps Step s before Choose Step (0-based indexing) Cost s after 1 abac Choose the index i = 3 3 aba 2 abac Choose the index i = 3 3 aba Example 2 Input: s = "abcde", t = "xca" Output: -1 Explanation: It is not possible to match the 'x' in t. Constraints 1 Strings s and t contain only lowercase English letters. Function Signature long getMinimumCost(string s, string t) --- Split Array into Two Subarrays Problem Description Given an array of integers, find the nu