Given two strings s1 and s2, return the minimum sum of ASCII values of characters that must be deleted from the two strings so that they become equal. Pattern focus: Edit distance. This is a weighted string DP variant where deletion cost depends on character values.
s1 = first string, s2 = second string
minimum ASCII delete sum
Example 1:
Input:
s1 = "sea" s2 = "eat"
Output:
231
Explanation:
Delete 's' from sea and 't' from eat, total 115 + 116 = 231.
Example 2:
Input:
s1 = "a" s2 = "b"
Output:
195
Explanation:
Delete both characters: 97 + 98 = 195.