Skip to content
Advertisement

Tag: anagram

String anagram in Java

i am trying to create a program for string anagram that follows these conditions: method should allow only letters, white space, commas and dots in an anagram. If there are any other characters, then the string cannot contain an anagram. The method should ignore all white space, commas and dots when it checks the text. If there are no letters

Best solution for an anagram check?

I’m going through a permutation/anagram problem and wanted input on the most efficient means of checking. Now, I’m doing this in Java land, and as such there is a library for EVERYTHING including sorting. The first means of checking if two string are anagrams of each other is to check length, sort them in some manner, then compare each index

Advertisement