EASY TO UNDERSTAND || C++
C++\n\n# Code\n\nclass MagicDictionary {\npublic:\n    vector<string> a;\n    MagicDictionary() {\n        \n    }\n    \n    void buildDict(vector<string> dict
C++\n\n# Code\n```\nclass MagicDictionary {\npublic:\n    vector<string> a;\n    MagicDictionary() {\n        \n    }\n    \n    void buildDict(vector<string> dictionary) {\n        for(int i=0;i<dictionary.size();i++){\n            a.push_back(dictionary[i]);\n        }\n    }\n    \n    bool search(string searchWord) {\n        int f=0;\n        for(int i=0;i<a.size();i++){\n            string temp=a[i];\n            if(a[i].size()!=searchWord.size())  continue;\n            int curr=0;\n            for(int j=0;j<temp.size();j++){\n                if(temp[j]==searchWord[j])  curr++;\n            }\n            if(curr==temp.size()-1){\n                f=1;\n                break;\n            }\n        }\n\n        return f==1;\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++']