Can I use a trie that has a whole word on each node?
问题 I want to implement a trie to check for the validity of paths, so I would have a tree built that contains all the possible path constructions by breaking it down by directory. So something like /guest/friendsList/search would go from the root node to it's child guest , then guest's child friendsList , and then friendsList's child search . If search is a leaf node then my string /guest/friendsList/search would be considered valid. Is this something a trie would be useful for. All the