Skip to content
Merged
Prev Previous commit
Next Next commit
feat: add testcase of assemble_transformation (TheAlgorithms#11810)
  • Loading branch information
zeelrupapara authored Dec 30, 2024
commit 493a7c153c1ca1805e60c109842ee1a1ee63cde2
8 changes: 8 additions & 0 deletions strings/min_cost_string_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ def assemble_transformation(ops: list[list[str]], i: int, j: int) -> list[str]:
>>> y1 = len(ops1[0]) - 1
>>> assemble_transformation(ops1, x1, y1)
[]

>>> ops2 = [['0', 'I1', 'I2', 'I3'],
... ['D1', 'C1', 'I2', 'I3'],
... ['D2', 'D2', 'R23', 'R23']]
>>> x2 = len(ops2) - 1
>>> y2 = len(ops2[0]) - 1
>>> assemble_transformation(ops2, x2, y2)
['C1', 'I2', 'R23']
"""
if i == 0 and j == 0:
return []
Expand Down