Skip to content

Commit a1518a3

Browse files
committed
Runtime: 4020 ms (Top 5.03%) | Memory: 205.5 MB (Top 14.36%)
1 parent e504968 commit a1518a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/M/Minimum ASCII Delete Sum for Two Strings/Minimum ASCII Delete Sum for Two Strings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Runtime: 4020 ms (Top 5.03%) | Memory: 205.5 MB (Top 14.36%)
12
class Solution:
23
def minimumDeleteSum(self, s1: str, s2: str) -> int:
34
m, n, lookup = len(s1), len(s2), {}
@@ -14,4 +15,4 @@ def fun(i, j):
1415
res = min(ord(s1[i]) + fun(i-1,j), ord(s2[j]) + fun(i,j-1))
1516
lookup[(i,j)] = res
1617
return lookup[(i,j)]
17-
return fun(m-1, n-1)
18+
return fun(m-1, n-1)

0 commit comments

Comments
 (0)