Amazon interview question

leetcode medium palindrome substring with optimizatiom