Find the Longest Palindromic Substring.
Unlock detailed company stats for this questionUpgrade
Write a brute force solution first, then a variation that returns the lexicographically greater palindrome, then the optimal solution, and explain time and space complexity.
Expect follow-ups like
- How would you solve a variation asking for the lexicographically greater palindrome?
- Variation: return the lexicographically greater palindrome.
Format · 60-minute technical round.
Also asked as · Longest Palindromic Substring.; Solve a variation of Longest Palindromic Substring.; Write code for the longest palindromic substring in a string.
Community answers
No answers contributed by the community yet.
Related questions
Find the longest palindromic subsequence of a string.Find the longest repeating substring.Palindromic Substrings.Related courses

Course

Course
Course







