Pergunta de entrevista da empresa State Farm

Implement a function to find the longest palindromic substring in a given string, and explain the time complexity of your solution.