

1. Both the strings are non-empty and are of the same length.
2. You can apply the above operations any number of times on ‘S’.
3. The operations can only be applied on the string ‘S’.
4. ‘S’ and 'R' consist of lowercase letters only.
The first line of the input contains an integer 'T' denoting the number of test cases.
The first line of each test case contains an integer ‘N’, denoting the size of the strings.
The second line of each test case contains two space-separated strings ‘S’ and 'R'.
For each test case print a single line containing either “true” if the string 'R' is a scrambled string of ‘S’, else “false”.
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 50
1 <= len(S) <= 30
Where ‘len(S)’ represents the length of the string ‘S’.
Time Limit: 1 sec
2.Another possibility is to concatenate the first parts of both the strings together and second parts together. Hence another possible state of DP can be SCRAMBLE[k][i][j] && SCRAMBLE[size-k][i+k][j+k].
3.After considering both the possibilities if any one of them returns true, we can consider that state as valid, and hence we can take or of both the possibilities and store it in SCRAMBLE[d][i][j].
4.Hence the final DP state will look like this:
SCRAMBLE[d][i][j] = (SCRAMBLE[k][i + size - k][j] && SCRAMBLE[size - k][i][j + k]) or (SCRAMBLE[k][i][j] && SCRAMBLE[size - k][i + k][j + k])