Given two string 'str1' and 'str2', check if two given strings are isomorphic to each other. Two strings str1 and str2 are called isomorphic if there is a one to one mapping possible for every character of str1 to every character of str2. And all occurrences of every character in ‘str1′ map to same character in ‘str2′.
The first line contains an integer T, depicting total number of test cases. Each test case contains two strings each in new line.
Print "1" if strings are isomorphic and "0" if not.
1 <= T <= 100
1 <= Length of Strings <= 103
Testcase 1: There are two different characters in aab and xxy, i.e a and b with frequency 2 and 1 respectively.
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.