Closed MimiOlayeye closed 3 years ago
Hi,
First, your Extra failed at some point.
Second, for a prefix does not exist or the candidate as null, your code failed;
Third, it seems that for certain prefix, for example "study", you did not return studying into the list.
Those are all major logic problems.
Thank you for getting back to me!
Hello, I'm not sure If concatenating the null character in the root node applies to my code. I passed all the cases when I tested my code myself, so I'm wondering what cases I failed when my code was tested?
On Line 147 of my code I have the method that returns the candidate word, I terminate the loop when node.getParent() == null so I'm pretty sure I'm not concatenating the null character.
My code: https://github.com/MimiOlayeye/dsa-java/blob/master/src/main/java/edu/emory/cs/trie/autocomplete/AutocompleteHW.java