Skip to content

Latest commit

 

History

History

anagrams

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Mapping many to one

Strings that are anagrams can transform to the same string.

mary and army are anagrams. and amry and them are also anagrams. so just put all strings into a HashMap with key of same mapping rule, then find out all the values count > 1.