Company: someone
Difficulty: medium
Based on the images provided, here are the two separate problems converted into a single, clean HTML structure. --- Question 1: 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 ≤ i . 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 = "abacc", 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 1 aba c c Choose the index i = 3 3 abac 2 aba c Choose the index i = 3 3 aba Example 2: Input: s = "abcde", t = "acx" Output: -1 Explanation: It is not possible to match the 'x' in t. Constraints 1 ≤ length of s and t ≤ 2 * 10 5 Strings s and t contain only lowercase E