Interview question of the issue #323 of rendezvous with cassidoo.
Given a string s
, you are allowed to delete at most k
characters. Find if the string can be a palindrome after deleting at most k
characters.
Example:
> kPal('abcweca', 2)
> true
> kPal('acxcb', 1)
> false
Just pnpm i
to install all dependencies and then pnpm t
to run the tests!