[EASY UNDERSTANDING][C++]
\nclass MagicDictionary {\npublic:\n\n    unordered_set<string> set;\n\t\n    MagicDictionary(){\n    }\n    \n    void buildDict(vector<string> dictionary){\n 
```\nclass MagicDictionary {\npublic:\n\n    unordered_set<string> set;\n\t\n    MagicDictionary(){\n    }\n    \n    void buildDict(vector<string> dictionary){\n        for(string str: dictionary)\n            set.insert(str);\n    }\n    \n    bool search(string searchWord){\n        for(string s: set){\n            if(s.size()==searchWord.size()){\n                int cnt=0;\n                for(int i=0;i<s.size();i++){\n                    if(s[i]!=searchWord[i]) cnt++;\n                }\n                if(cnt==1) return true;\n            }\n        }\n        return false;\n    }\n\t\n};\n```\n**Feel free to ask any question in the comment section.**\nI hope that you\'ve found the solution useful.\nIn that case, **please do upvote and encourage me** to on my quest to document all leetcode problems\uD83D\uDE03\nHappy Coding :)\n
['C', 'C++']