Minimum Ascii Delete Sum For Two Strings

easy
1. You are given two strings s1 and s2
 2. Delete characters is s1 and s2 to make the two strings equal such that their ASCII sum is the least value possible
 3. Find and return the value
 4. Input and output is handled for you
 5. It is a functional problem ,please do not modify main()

Input Format

Input is handled for you

Output Format

Output is handled for you

Constraints

0<=Both strings' lengths<=1000
 ASCII value of all strings characters are in the range [97, 122]

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
abcz
dabc
Output
222
Previous
Maximum Sum Increasing Subsequence
Next
Minimum Cost For Tickets

Related Questions