Trie implementation with wildcard values
问题 I'm implementing an algorithm to do directory matching. So I'm given a set of valid paths that can include wildcards (denoted by "X"). Then when I pass in an input I need to know if that input matches with one of the paths in my valid set. I'm running into a problem with the wildcards when a wildcard value that is passed in actually matches with another valid value. Here is an example: Set of valid paths: /guest /guest/X /X/guest /member /member/friends /member/X /member/X/friends Example