Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (13.1k points)
I was trying to write a program on whether two words are anagrams or not. But it is not working properly. Can anyone help me with this?

1 Answer

0 votes
by (26.7k points)

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!!

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Feb 11, 2021 in Java by dante07 (13.1k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...