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'
A = 'scaler' B = 'interviewbit'
We can rearrange the second string to 'scaler', hence, a permuation exists.
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.