Searching anagrams with Java 8
问题 I have to write program which should be reading file for anagrams and show word + his anagrams. Txt files is very big, after using scanner, listOfWords size is: 25000. Output example: word anagram1 anagram2 anagram3 ... word2 anagram1 anagram2... I have code, it works but very slow: private static List<String> listOfWords = new ArrayList<String>(); private static List<ArrayList<String>> allAnagrams = new ArrayList<ArrayList<String>>(); public static void main(String[] args) throws Exception {