712. Minimum ASCII Delete Sum for Two Strings
712. Minimum ASCII Delete Sum for Two Strings
Description
Given two strings s1
ands2
, return the lowest ASCII sum of deleted characters to make two strings equal.
Example 1:
1 | Input: s1 = "sea", s2 = "eat" |
Example 2:
1 | Input: s1 = "delete", s2 = "leet" |
Constraints:
1 <= s1.length, s2.length <= 1000
s1
ands2
consist of lowercase English letters.
Hints/Notes
- 2024/07/18
- dp
- No solution from 0x3F
Solution
Language: C++
1 | class Solution { |