Find the longest shared prefix for a list of strings using a Trie.