Given a string you have to transform it into a palindrome . In order to acheive that you have to perform exactly k insertion of characters(you cannot perform any more or less number of insertions).Now you have to report whether the string can be converted to a palindrome by making exactly k insertions.
The first line contains the number of test cases T. For each test case the first line contains the length of the string N and the number of insertions k. The second line contains the string S.
For each test case, print "YES"(without quotes) if the string can be converted to a palindrome making exactly k insertions otherwise "NO"(without quotes).
1 ≤ T ≤ 100
The string consists of only lower case English Alphabets (a-z).
For the first test case abac can be transformed to cabbac (which is palindrome) adding two characters c and b.
For the second test case abcde cannot be transformed to palindrome using 3 insertions.
For the third test case ab can be transformed to cabac (which is palindrome) adding three characters a, c and c.
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.