Statementâ–¼
Given a string s
, return the longest palindromic substring in s
.
Constraints
-
1≤
s.length
≤1000 -
s
consist of only digits and English letters.
Solution
So far, you’ve probably brainstormed some approaches and have an idea of how to solve this problem. Let’s explore some of these approaches and figure out which to follow based on considerations, such as time complexity and implementation constraints.