Closed zche377 closed 4 years ago
Also, is it case sensitive?
Should we assume that each country name in the input String is a combination of independent words?
Trie is character-based. Introducing the idea of independent words is not necessary.
Also, is it case sensitive?
Please take a look at this picture and see the character stored in every node.
Similar to the "America" - "American" case mentioned in Textbook,
Like, should we get "Canada" from "... aabbccCanada ..." ?
The answer is yes.
Should we assume that each country name in the input String is a combination of independent words? Like, should we get "Canada" from "... aabbccCanada ..." ?