[C++] 94% Faster Solution | Unordered Map | Easy to Understand 😉
\n\n\nclass Solution {\npublic:\n    int countConsistentStrings(string allowed, vector<string>& words) {\n        //Making a map to keep the allowed character a
![image](https://assets.leetcode.com/users/images/8d8bb0a1-0215-4b3b-a126-7f0a60b4f2fe_1625227735.5186918.png)\n\n```\nclass Solution {\npublic:\n    int countConsistentStrings(string allowed, vector<string>& words) {\n        //Making a map to keep the allowed character as keys \n        unordered_map<char, bool> mp;\n        for(auto x: allowed){\n            if(!mp[x]) mp[x] = 1;\n        }\n        \n        // Output count initialized with zero\n        int count = 0;\n        \n        //Traversing through each character in words\n        for(auto x: words){\n            bool flag = 1;\n            for(auto y: x){\n                if(mp.find(y) == mp.end()) { // Checking if the character isn\'t present as key in the map\n                    flag=0;\n                    break;\n                }\n            }\n            if(flag == 1) count++; // If the flag remained 1 through whole char traversal, count it!\n        }\n        \n        return count;\n    }\n};\n\n```\n
['C']