C# Solution using Trie
\npublic class Node{\n    public bool endWord;\n    public Dictionary<char,Node> childs;\n    public Node(bool _endWord = false){\n        childs = new Dictiona
```\npublic class Node{\n    public bool endWord;\n    public Dictionary<char,Node> childs;\n    public Node(bool _endWord = false){\n        childs = new Dictionary<char,Node>();\n        endWord = _endWord;\n    }\n}\n\npublic class MagicDictionary {\n    Node head;\n\n    public MagicDictionary() {\n        head = new Node();\n    }\n    \n    public void BuildDict(string[] dictionary) {\n        foreach(var word in dictionary){\n            var cur = head;\n            foreach(var c in word){\n                if(!cur.childs.ContainsKey(c))\n                    cur.childs.Add(c,new Node());\n                cur = cur.childs[c];\n            }\n            cur.endWord = true;\n        }\n    }\n    \n    public bool Search(string searchWord) {\n        int n = searchWord.Length;\n        bool dfs(int idx, Node node,int dismatch){\n            if(dismatch > 1) return false;\n            if(idx >= n && node.endWord && dismatch == 1)return true;\n            if(idx >= n) return false;\n            char c = searchWord[idx];\n            bool res = false;\n            foreach(var kv in node.childs){\n                if(kv.Key == c)\n                    res |= dfs(idx + 1,kv.Value,dismatch);\n                else \n                    res |= dfs(idx + 1,kv.Value,dismatch + 1);\n            }\n            return res;\n        }\n        return dfs(0,head,0);\n    }\n}\n\n```
['Depth-First Search', 'Trie', 'C#']