I was actually asked this question in a real interview in the past. LeetCode 409: Longest Palindrome youtu.be/WpYAmcWKu7o