Below are the comments added inline here.
What is "k-drome"? A string is k-drome if it can be transformed into a palindrome, by removing at the most N characters from it.
What do you mean "characters to remove"? I am given a string and a number N, and I am trying to find out if that string is K-drome or not.
In what way does it not "work as expected"? It has some logic issue here, so not working as expected. do you have any suggestions for this?