A string is k palindrome if it can be transformed into a palindrome on removing at most k characters from it. Your task is to complete the function is_k_palin which takes two arguments a string str and a number N . Your function should return true if the string is k palindrome else it should return false.
The first line of input is an integer T denoting the number of test cases . Then T test cases follow . Each test case contains a string str and an integer N separated by space.
The output will be 1 if the string is k palindrome else 0 .
1<=length of str<=100
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.