Palindrome After Removing Characters

Asked at Meta · Coding Questions · Difficulty: Medium

A string is a palindrome when it reads the same forwards and backwards. Decide whether a string can be turned into a palindrome by deleting at most one character, and then, as a follow-up, at most `k` characters. Deleting a character removes it and closes the gap; the other characters keep their order.

Loading the problem…