code to find maximum length pallindromic substring in O(n) and finding all substrings of this maximum length