I have been given a problem in which I have to implement a Trie that stores words.
The important methods of the Trie are:
getAllWords(): returns a String array of all the words in the Trie.
hasWord(String s): returns whether the Trie has s or not
hasPrefix(String p):returns whether the Trie contains p or not.
I have made a TrieNode class. Each TrieNode has an array that stores 27 other TrieNodes(for 26 alphabets, and one to indicate the end of a word).A TrieNode also has a char value.
Can someone pls implement the methods given above for me. I have tried a lot but I couldnt do them. The methods are to be done recursively.
I have to find a solution to this problem by 12 noon tomorrow (apr 4, 12 noon (EST)).
Any help would be greatly appreciated.
P.S. the handout for the assignment is attatched with this message.
04-03-2004, 09:44 PM
My mistake, there is no handout attatched with this message.