This commit is contained in:
Erfan Alimohammadi 2019-05-14 21:45:53 +04:30 committed by GitHub
parent 3c40fda6a3
commit c4d16820bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):
if center-diff == -1 or center+diff == len(string) or string[center-diff] != string[center+diff] :
return 0