


The first line of input contains an integer ‘T’, denoting the number of test cases. Then the test cases follow.
The first line of each test case contains the integer ‘K’, The maximum number of changes that are allowed to be made.
The second line of each test case contains the string ‘A’, The string that Alice loves. ‘A’ contains all lowercase letters.
The third line of each test case contains the random string ‘B’ that Bob got from his friend. ‘B’ contains all lowercase letters.
For each test case, Return True if it is possible to change string ‘B’ to string ‘A’ under given constraints else return False.
Print the output of each test case in a new line.
1 <= T <= 5
1 <= k <= 10^5
1 <= |A| <= 10^5
1 <= |B| <= 10^5
Time Limit = 1 sec
The approach is pretty simple. First, generate the freq of each character for both string A and string B. Now for every character in string B, if the frequency of this character is more in string B as compared to string A, then we forcefully need to change some of the characters preferably their difference to some other character in order to make it equal to string B. count the sum of changes for each character and if it is less than or equal to K then it is possible to change string B to A under given constraints else not.
The only base case to be considered is if the length of each string is not equal then it is impossible to make them equal.