EASY TO UNDERSTAND || C++ || RECURSION || TRIE
struct Trie{\n    Trie child[26];\n    bool isEnd;\n};\n\nclass MagicDictionary {\npublic:\n    \n    Trie root;\n    \n    MagicDictionary() {\n        \n     
struct Trie{\n    Trie *child[26];\n    bool isEnd;\n};\n\nclass MagicDictionary {\npublic:\n    \n    Trie *root;\n    \n    MagicDictionary() {\n        \n        root = new Trie();\n        for(int i=0;i<26;i++)\n            root->child[i] = NULL;\n        root->isEnd = false;\n    }\n    \n    void insert(string &s,Trie *root){\n        Trie *temp = root;\n        for(int i=0;i<s.length();i++){\n            int index = s[i]-\'a\';\n            if(!temp->child[index])\n                temp->child[index] = new Trie();\n            temp = temp->child[index];\n        }\n        \n        temp->isEnd = true;\n    }//insert\n    \n    \n    //k=0 => all characters are find till now\n    //k=1 => one charaxters is missing\n    \n    bool find(string &s,int index,Trie *root ,int k){\n        \n        for(int i=index;i<s.length();i++){\n            int index = s[i]-\'a\';\n            if(k==1 && root->child[index]==NULL)\n                return 0;\n            \n              if(k==0){ \n                for(int j=0;j<26;j++){\n                    if(root->child[j] && j!=index){\n                        if(find(s,i+1,root->child[j],1))\n                            return 1;\n                    }\n                }//j\n              }   \n            \n               if(root->child[index]==NULL)\n                 return 0;\n               else\n                   root = root->child[index];\n            //}//if\n          \n        }//i\n        \n        return (root!=NULL && root->isEnd && k==1);\n    }\n    \n    void buildDict(vector<string> dict) {\n        \n        int i,j,n=dict.size();\n        for(auto x:dict)\n            insert(x,root);\n    }\n    \n    bool search(string s) {\n        \n        Trie *temp = root;\n        return find(s,0,temp,0);\n    }\n};\n\n/**\n * Your MagicDictionary object will be instantiated and called as such:\n * MagicDictionary* obj = new MagicDictionary();\n * obj->buildDict(dictionary);\n * bool param_2 = obj->search(searchWord);\n */
['Depth-First Search', 'Trie', 'C']