Skip to content

Commit ecf5929

Browse files
authored
Update minimum-cost-to-separate-sentence-into-rows.py
1 parent 54f89fd commit ecf5929

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/minimum-cost-to-separate-sentence-into-rows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def lens(sentence):
1515
yield j-i
1616
j = i-1
1717

18-
dp, word_lens = [], [] # dp[i]: min cost of word_lens[-1-i:]
18+
word_lens, dp = [], [] # dp[i]: min cost of word_lens[-1-i:]
1919
t = -1
2020
for l in lens(sentence):
2121
word_lens.append(l)

0 commit comments

Comments
 (0)