Unordered Maps C++ Solution
\nclass WordDictionary {\npublic:\n    /** Initialize your data structure here. */\n    unordered_map<int,vector<string>> map;\n    \n    bool check(string a,st
```\nclass WordDictionary {\npublic:\n    /** Initialize your data structure here. */\n    unordered_map<int,vector<string>> map;\n    \n    bool check(string a,string b)\n    {\n        int n=a.size();\n        for(int i=0;i<n;i++)\n        {\n            if(a[i]==\'.\')\n                continue;\n            else if(a[i]!=b[i])\n                return false;\n        }\n        return true;\n    }\n    \n    \n    \n    \n    WordDictionary() {\n        \n    }\n    \n    /** Adds a word into the data structure. */\n    void addWord(string word) {\n        \n        int n=word.size();\n        map[n].push_back(word);\n        \n        \n    }\n    \n    /** Returns if the word is in the data structure. A word could contain the dot character \'.\' to represent any one letter. */\n    bool search(string word) {\n        \n        int n=word.size();\n        for(string s : map[n])\n        {\n            if(check(word,s))\n                return true;\n        }\n        return false;\n    }\n};\n\n/**\n * Your WordDictionary object will be instantiated and called as such:\n * WordDictionary* obj = new WordDictionary();\n * obj->addWord(word);\n * bool param_2 = obj->search(word);\n */\n```
[]