[C++] Try all combinations || very easy to understand
\nclass MagicDictionary {\npublic:\n   unordered_set<string>st;\n    MagicDictionary() \n\t{\n       st.clear();    \n    }\n    \n    void buildDict(vector<str
```\nclass MagicDictionary {\npublic:\n   unordered_set<string>st;\n    MagicDictionary() \n\t{\n       st.clear();    \n    }\n    \n    void buildDict(vector<string> dict) \n\t{\n       for(int i=0;i<dict.size();i++)\n       {\n       \t  st.insert(dict[i]);\n\t   }\n    }\n    \n    bool search(string word) \n\t{\n        for(int i=0;i<word.length();i++)\n        {\n       \t    string temp_word = word;\n       \t    char temp_ch = word[i];\n       \t    \n        \tfor(int j=0;j<26;j++)\n        \t{\n        \t   char ch=char(j + \'a\');\n\t\t\t   if(temp_ch != ch)\n\t\t\t   {\n\t\t\t      \ttemp_word[i] = ch;\n\t\t\t      \t\n\t\t\t      \tif(st.find(temp_word)!=st.end())\n\t\t\t      \treturn true;\n\t\t\t   }\t\n\t\t\t}\n\t\t}\n\t\treturn false;\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 */\n```
['C', 'C++']