Go Trie clear solution
\ntype WordDictionary struct {\n    nodes       map[rune]*WordDictionary\n    endOfWord   bool\n}\n\nfunc Constructor() WordDictionary {\n    return WordDiction
```\ntype WordDictionary struct {\n    nodes       map[rune]*WordDictionary\n    endOfWord   bool\n}\n\nfunc Constructor() WordDictionary {\n    return WordDictionary{make(map[rune]*WordDictionary), false}\n}\n\nfunc (d *WordDictionary) AddWord(word string) {\n    for _, r := range word {\n        if _, found := d.nodes[r]; !found { node := Constructor(); d.nodes[r] = &node }\n        d = d.nodes[r]\n    }\n    d.endOfWord = true\n}\n\n\nfunc (d *WordDictionary) Search(word string) bool {\n    for i, r := range word {\n        if _, found := d.nodes[r]; !found {\n            if r != \'.\' { return false }\n            for _, node := range d.nodes {\n                if node.Search(word[i+1:]) { return true }\n            }\n            return false\n        }\n        d = d.nodes[r]\n    }\n    return d.endOfWord\n}\n```
['Trie', 'Go']