100% fast C#
\t\tpublic class Solution {\n\t\t\tpublic string LongestWord(string[] words) {\n\t\t\t\tArray.Sort(words);\n\t\t\t\tHashSet hash = new HashSet();\n\t\t\t\tstrin
\t\tpublic class Solution {\n\t\t\tpublic string LongestWord(string[] words) {\n\t\t\t\tArray.Sort(words);\n\t\t\t\tHashSet<string> hash = new HashSet<string>();\n\t\t\t\tstring res = "";\n\t\t\t\tforeach(string word in words){\n\t\t\t\t\tif(word.Length == 1 || hash.Contains(word.Substring(0, word.Length-1))){\n\t\t\t\t\t\tres = word.Length > res.Length ? word : res;\n\t\t\t\t\t\thash.Add(word);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn res;\n\t\t\t}\n\t\t}
[]