Minimum Ascii Delete Sum For Two Strings
medium
1. You are given two strings S1 and S2. 2. You have to make these two strings equal by deleting characters. You can delete characters from any of the two strings. 3. The cost of deleting a character from any string is the ASCII value of that character. 4. You have to find the minimum ASCII sum of deleted characters.
Constraints
1 <= length of strings S1 and S2 <= 1000
Format
Input
Two Strings S1 and S2
Output
A number representing the minimum ASCII sum of deleted characters.
Example
Sample Input
sea
eat
Sample Output
231
Question Video