Skip to content

Commit 6356f10

Browse files
refactor 712
1 parent c399c47 commit 6356f10

File tree

1 file changed

+0
-24
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-24
lines changed

src/main/java/com/fishercoder/solutions/_712.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 712. Minimum ASCII Delete Sum for Two Strings
5-
*
6-
* Given two strings s1, s2, find the lowest ASCII sum of deleted characters to make two strings equal.
7-
8-
Example 1:
9-
Input: s1 = "sea", s2 = "eat"
10-
Output: 231
11-
Explanation: Deleting "s" from "sea" adds the ASCII value of "s" (115) to the sum.
12-
Deleting "t" from "eat" adds 116 to the sum.
13-
At the end, both strings are equal, and 115 + 116 = 231 is the minimum sum possible to achieve this.
14-
15-
Example 2:
16-
Input: s1 = "delete", s2 = "leet"
17-
Output: 403
18-
Explanation: Deleting "dee" from "delete" to turn the string into "let",
19-
adds 100[d]+101[e]+101[e] to the sum. Deleting "e" from "leet" adds 101[e] to the sum.
20-
At the end, both strings are equal to "let", and the answer is 100+101+101+101 = 403.
21-
If instead we turned both strings into "lee" or "eet", we would get answers of 433 or 417, which are higher.
22-
23-
Note:
24-
0 < s1.length, s2.length <= 1000.
25-
All elements of each string will have an ASCII value in [97, 122].
26-
*/
273
public class _712 {
284
public static class Solution1 {
295
//credit: https://leetcode.com/articles/minimum-ascii-delete-sum-for-two-strings/

0 commit comments

Comments
 (0)