Python Iterative BFS Trie (with comments)
\nclass TrieNode:\n    def __init__(self):\n        self.children = dict()\n        self.is_word = False\n\nclass WordDictionary:\n\n    def __init__(self):\n  
```\nclass TrieNode:\n    def __init__(self):\n        self.children = dict()\n        self.is_word = False\n\nclass WordDictionary:\n\n    def __init__(self):\n        self.root = TrieNode() # instantiate Trie data structure\n\n    def addWord(self, word: str) -> None:\n        node = self.root\n        for char in word:\n\t\t    # add a character to the children of node if it doesn\'t already exist in the children dictionary, then traverse to this child node\n            node = node.children.setdefault(char, TrieNode()) \n        node.is_word = True\n        \n    def search(self, word: str) -> bool:\n        queue = [self.root]\n        for char in word: \n            tmp = [] # append new nodes to this temporary queue\n            for node in queue: # for a sinlge char, bfs over the possible nodes (due to the wildcard \'.\')\n                if char == \'.\': # if the char is a wildcard, append all child nodes into a queue to bfs at next iteration.\n                    for child in node.children:\n                        tmp.append(node.children[child])\n                elif node.children.get(char): # if the char is found, keep going deeper into its children\n\t\t\t\t\t# Keep adding to tmp array when wildcard \'.\' results in nodes with the same char appearing. \n\t\t\t\t\t# e.g., suppose adding two words \'abc\' and \'cbd\'. When searching for \'.bc\', \n\t\t\t\t\t# both word nodes will be appended as candidates at the node.children[\'b\']\n                    tmp.append(node.children[char]) \n            queue = tmp # the newly appended queue to bfs over in the next iteration\n        return any([node.is_word for node in queue])    \n```
['Breadth-First Search', 'Trie', 'Iterator', 'Python']