mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-19 00:37:02 +00:00
Fix typo (#806)
This commit is contained in:
parent
3c40fda6a3
commit
c4d16820bc
|
@ -1,4 +1,4 @@
|
||||||
# calculate palindromic length from center with incresmenting difference
|
# calculate palindromic length from center with incrementing difference
|
||||||
def palindromic_length( center, diff, string):
|
def palindromic_length( center, diff, string):
|
||||||
if center-diff == -1 or center+diff == len(string) or string[center-diff] != string[center+diff] :
|
if center-diff == -1 or center+diff == len(string) or string[center-diff] != string[center+diff] :
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user