Of course you are; every program more complicated than “Hello, World” uses an algorithm. It appears your algorithm is counting all the letters, and then confirming whether two words have the same letters and the same counts.
Tomy Alexsander wrote:. . . I am not using any specific algorithm. . . .
You are not counting words. You are counting number of histogram characters that match.
Tomy Alexsander wrote:I need to return the number of case-insensitive anagrams of the word.
You put the count outside BOTH loops now. You needed to put it outside the inner loop.
Tomy Alexsander wrote:I put counter outside. but now it conflicts with when I am adding and and and it thinks that it is an anagram.
but not all. we have massive limitation
Tomy Alexsander wrote:Yes i am
And you have to write one method. Both would be regarded as poor practice in real life, though part of the exercise might be to write your own algorithms as would be implemented by a library method.
Tomy Alexsander wrote:. . . we have massive limitation