how to solve this problem using trie? thanks


  • 0
    O

    If a string is matched to any filter, it is in the black list, otherwise not.
    Design a data structure and implement following two functions.

    addFilter(filter)
    isInBlackList(string)

    filters having at most one star * , which matches 0 or more chars.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.