I created a Java Trie as part of a project someone challenged me to do. I'm not sure that this is the most efficient way to go about producing a Trie, I know that this works but I was hoping someone with some professional experience could enlighten me on anything I might be doing fundamentally wrong.
I'm studying computer science in college and have no professional experience with development.
I'm mainly curious to know what you think about this with respect to:
My use of methods, some are static while others are not. For the scope of the methods, I feel like I might have been better off putting the entire search function or getWords function inside the Trie class and not the TrieNode class, but I was unable to figure out how to do that logically.
The use of comments or the logical flow of the code. Would this be a nightmare in an office or is this about what you would hope for?
Efficiency of the code. I know recursion can be demanding, but I think that the nature of the way this is created has made it more efficient than lets say a massive list of words. I would need a giant library.txt file to test that theory, though and I don't really have one to work with.