Skip to content

Commit 70856d7

Browse files
authored
Update number-of-ways-to-separate-numbers.py
1 parent bade2a5 commit 70856d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/number-of-ways-to-separate-numbers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def is_less_or_equal_to_with_same_length(num, lcp, i, j, l):
2929
accu = 0
3030
for l in xrange(len(num)-i+1):
3131
ni = i+l-1
32-
dp[ni][l-1] = accu # accumulated count where the length of the second to last number is shorter than the length of the last number
32+
dp[ni][l-1] = accu # accumulated count where the length of the second to last number ending at num[i-1] is shorter than the length of the last number ending at num[i+l-1]
3333
if i-l < 0:
3434
continue
3535
if num[i-l] != '0' and is_less_or_equal_to_with_same_length(num, lcp, i-l, i, l):

0 commit comments

Comments
 (0)