Skip to content

Commit

Permalink
feat: add testcase of assemble_transformation (#11810)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeelrupapara authored Dec 30, 2024
1 parent da587d0 commit 493a7c1
Showing 1 changed file with 8 additions and 0 deletions.
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

0 comments on commit 493a7c1

Please sign in to comment.