We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d12d7d commit 3323ddeCopy full SHA for 3323dde
algoexpert.io/python/Palindrome_Partitioning_Min_Cuts.py
@@ -45,7 +45,7 @@ def palindromePartitioningMinCuts(string):
45
palindromes[i][j] = string[i] == string[j]
46
else:
47
palindromes[i][j] = string[i] == string[j] and palindromes[i + 1][j - 1]
48
- cuts = [float('-inf') for i in len(string)]
+ cuts = [float('-inf') for i in string]
49
for i in range(len(string)):
50
if palindromes[0][i]:
51
cuts[i] = 0
0 commit comments