Given two strings A and B, find whether A and B are anagrams of each other or not.
A: ”abcd”
B: “dabc”
A & B are anagrams.
A: “workattech”
B: “worktattch”
A & B are not anagrams.
The first line contains an integer ‘T’ denoting the number of test cases.
For each test case, the input contains three lines
For each test case, the output contains a line with 1 if strings are anagrams and 0 otherwise.
4
5 5
apple
pplae
5 4
learn
nerd
4 4
abcd
dabc
10 10
workattech
worktattch
1
0
1
0
1 <= T <= 100
1 <= n, m <= 104
Strings should be composed of lowercase English characters.