1178. Valid Palindrome III

Hard
String
Dynamic Programming

Description

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.

Statistics

Acceptance
49.1%
Submissions
219,436
Accepted
107,803