giving run error in some test cases , don’t know why?
this is my code
giving run error in some test cases , don’t know why?
this is my code
@diwakargour121,
In your private void addWord(String word, node parent) method, in case the word length is 0 and parent.isTerminal is true, your code will give you a runtime error.
ok , but now the cases are giving wrong answer , what is wrong in this logic https://ide.codingblocks.com/s/194427
@diwakargour121,
I have made some changes to your code: https://ide.codingblocks.com/s/197235
I am not using a hashmap instead using an array of nodes as children.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.