Longest palindrome linear time
Your task
Given a string s, return the LENGTH of the longest palindromic substring (contiguous). Solve it in O(n) time. 1 <= len(s) <= 100000, lowercase letters. Example: 'forabccddccbafor' -> 10 ('abccddccba').
Examples
longest_palindrome_len(s: str) -> intExample 1
Input
longest_palindrome_len("forabccddccbafor")Output
10