Closed caroltang0331 closed 3 years ago
Hi, sorry that I did not quite understand why would the order affect the result? Are you concerning when traversing the nodes one-by-one to find the next character, it will affect the time complexity?
never mind it didn't affect my result. Sorry, I got it now.
No worries! Glad to solve your problem!
can we assume the words are alphabetically inserted in the trie because the dict.txt is alphabetically ordered? I just want to make sure of the edge case that the list of words read and put in the trie could be randomly ordered unlike a normal dictionary.