← Questions

Longest palindromic substring

0
MetaCodingLast asked Nov 2025

Return the longest substring of a string that reads the same forwards and backwards. Start with expanding around each center, state the time and space, and say how you would get to linear time if asked.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding