Search⌘ K
AI Features

Longest Palindromic Substring

Understand how to identify and return the longest palindromic substring in a given string. This lesson helps you practice implementing an optimal solution with O(n²) time and space complexity, reinforcing pattern recognition skills critical for coding interviews.

Statement

Given a string s, return the longest palindromic substring in s.

Note: ...