Problem Description
You are given two strings A and B. Check whether there exists any permutation of both A and B such that they are equal.
Return a single integer 1 if its exists, 0 otherwise.
A = 'scaler'
B = 'relasc'
Input 2:
A = 'scaler'
B = 'interviewbit'
1
Output 2:
0
We can rearrange the second string to 'scaler', hence, a permuation exists.
Explanation 2:
The given length of the two strings itself is different. There is no possible permutation.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.