Python solution recursive version (DFS)
\nclass TrieNode(object):\n\n    def init(self):\n        self.word = False\n        self.children = {}\n\nclass WordDictionary(object):\n\n    def init(self):\
\nclass TrieNode(object):\n\n    def __init__(self):\n        self.word = False\n        self.children = {}\n\nclass WordDictionary(object):\n\n    def __init__(self):\n        self.root = TrieNode()\n\n    def addWord(self, word):\n        node = self.root\n        for c in word:\n            if c not in node.children:\n                node.children[c] = TrieNode()\n            node = node.children[c]\n        node.word = True\n\n    def search(self, word):\n        return self.searchFrom(self.root, word)\n\n    def searchFrom(self, node, word):\n        for i in xrange(len(word)):\n            c = word[i]\n            if c == '.':\n                for k in node.children:\n                    if self.searchFrom(node.children[k], word[i+1:]):\n                        return True\n                return False\n            elif c not in node.children:\n                return False\n            node = node.children[c]\n        return node.word
['Recursion', 'Python']