LeetCode-Swift
LeetCode-Swift copied to clipboard
[LongestPalindromicSubstring] Question
Hi there,
Can u give a bit explanation of the following lines:
for i in 0..<arr.count {
searchPalindrome(arr,i,i,&start,&maxLength)
searchPalindrome(arr,i,i+1,&start,&maxLength)
}
and:
if maxLength < r - l - 1 {
start = l + 1
maxLength = r - l - 1
}
Best Regards