Skip to content

Commit 493a7c1

Browse files
authored
feat: add testcase of assemble_transformation (#11810)
1 parent da587d0 commit 493a7c1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

strings/min_cost_string_conversion.py

+8
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ def assemble_transformation(ops: list[list[str]], i: int, j: int) -> list[str]:
9191
>>> y1 = len(ops1[0]) - 1
9292
>>> assemble_transformation(ops1, x1, y1)
9393
[]
94+
95+
>>> ops2 = [['0', 'I1', 'I2', 'I3'],
96+
... ['D1', 'C1', 'I2', 'I3'],
97+
... ['D2', 'D2', 'R23', 'R23']]
98+
>>> x2 = len(ops2) - 1
99+
>>> y2 = len(ops2[0]) - 1
100+
>>> assemble_transformation(ops2, x2, y2)
101+
['C1', 'I2', 'R23']
94102
"""
95103
if i == 0 and j == 0:
96104
return []

0 commit comments

Comments
 (0)