Skip to content

Commit a2c790e

Browse files
committed
done
1 parent 9a32f0b commit a2c790e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: strings/min_cost_string_conversion.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import List, Tuple
2+
13
"""
24
Algorithm for calculating the most cost-efficient sequence for converting one string
35
into another.
@@ -9,7 +11,9 @@
911
"""
1012

1113

12-
def compute_transform_tables(X, Y, cC, cR, cD, cI):
14+
def compute_transform_tables(
15+
X: str, Y: str, cC: int, cR: int, cD: int, cI: int
16+
) -> Tuple[List[int], List[str]]:
1317
X = list(X)
1418
Y = list(Y)
1519
m = len(X)
@@ -46,7 +50,7 @@ def compute_transform_tables(X, Y, cC, cR, cD, cI):
4650
return costs, ops
4751

4852

49-
def assemble_transformation(ops, i, j):
53+
def assemble_transformation(ops: List[str], i: int, j: int) -> List[str]:
5054
if i == 0 and j == 0:
5155
seq = []
5256
return seq

0 commit comments

Comments
 (0)