Trie implementation
问题 I am attempting to implement a very simple Trie in Java that supports 3 operations. I'd like it to have an insert method, a has method (ie is a certain word in the trie), and a toString method to return the trie in string form. I believe I have insertion working properly, but has and toString are proving to be difficult. Here's what I have so far. The trie class. public class CaseInsensitiveTrie implements SimpleTrie { //root node private TrieNode r; public CaseInsensitiveTrie() { r = new