Basically, in able to work it properly we need to map all the English alphabets to a unique prime number, once done, we need to calculate the product. And, if the products of both the string are the same. Then, the two strings will become Anagrams.
I hope this will help.
Want to become a Java Expert? Join Java Course now!!