Java 19ms solution (modified trie solution)
1\u3001use HashMap to categorized words by length.\n\n      MaptrieMap = new HashMap();\n\n2\u3001all words of the same length are put in to a trie.\n \nIn a no
1\u3001use HashMap to categorized words by length.\n\n      Map<Integer,TrieNode>trieMap = new HashMap<Integer,TrieNode>();\n\n2\u3001all words of the same length are put in to a trie.\n \nIn a normal trie solution,we can only search one letter per time, \n\nhowever,there are many cases where letters are continuously the same, say "caaaab"\n\nso we can condense these continuously duplicated letters into one trie node instead of multiple trie node\n\nHere is how TrieNode is defined:\n\n    class TrieNode{\n\t\tTrieNode children[];\n\t\tint len = 0;  //record the number of character that is continuously duplicated\n\t\tpublic TrieNode(){\n\t\t\tchildren = new TrieNode[26];\n\t\t}\n\t}\n\nthis helps to reduce the trie height and the search path \n\nPS:\n \nI was able to beat 100% percent of java submission( about 15ms) just using a small trick\n\nChange the type of trieMap to an array \n\n    TrieNode[]trieMap = new TrieNode[512];  //the maximum length of all testd words is about 500
['Java']