bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
Medium1-D Dynamic ProgrammingLC 5

Longest Palindromic Substring

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

Asked at 30 companies
AdobeAirbnbAlibaba
Hints
  • 1.Think about what data structure fits Longest Palindromic Substring
  • 2.Consider the brute force complexity and how to optimize
  • 3.Can you trade space for time?
LeetCodeNeetCode