Longest Palindromic Substring
Try to solve the Longest Palindromic Substring problem.
We'll cover the following
1 of 2
2 of 2
Understand the problem#
Let’s take a moment to make sure you have correctly understood the problem. The quiz below helps you check that you are solving precisely the right problem:
Longest Palindromic Substring
1
Which of the following is the longest palindromic substring in “abcdefghgfe”
A)
“ghg”
B)
“abcdefghgfe”
C)
“efghgfe”
Question 1 of 20 attempted
Try it yourself#
Implement your solution in the following coding playground.
The optimal solution to this problem runs in O(n2) time and takes O(n2) space.
Python
usercode > main.py
Longest Palindromic Substring
You might want to go over the Dynamic Programming pattern again.
Solution: Combination Sum
Solution: Longest Palindromic Substring