Search
⌘K

Leetcode 1216. Valid Palindrome III

Given a string s and integer k, determine whether you can delete at most k characters to make s a palindrome. This essentially asks whether the longest palindromic subsequence has length ≥ n−k, typically solved with an O(n^2) dynamic programming approach.

Asked at:

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late February, 2025

Meta

Mid-level

Mid January, 2025

Meta

Senior

Valid Palindrome with k removals: Modify the Valid Palindrome 2 solution to handle removing up to k characters instead of just one

Mid January, 2025

Meta

Mid-level

Comments

Your account is free and you can post anonymously if you choose.