We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2586b3a commit f86b326Copy full SHA for f86b326
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