1216. Valid Palindrome III
StringDynamic Programming
Hints
Hint 1
Can you reduce this problem to a classic problem?
Hint 2
The problem is equivalent to finding any palindromic subsequence of length at least N-K where N is the length of the string.
Hint 3
Try to find the longest palindromic subsequence.
Hint 4
Use DP to do that.
Preparing judge…