simple and easy C++ solution 😍❤️‍🔥
\n\n# Code\ncpp []\nclass Solution {\npublic:\n    int countConsistentStrings(string all, vector<string>& w) \n    {\n        int n = w.size(); // Get the size 
\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int countConsistentStrings(string all, vector<string>& w) \n    {\n        int n = w.size(); // Get the size of the vector \'w\' (number of words)\n        int cnt = 0; // Initialize a counter to count the number of consistent strings\n\n        // Loop through each word in the vector \'w\'\n        for(int i = 0; i < n; i++)\n        {\n            // Create a set of unique characters in the current word \'w[i]\'\n            set<char> st(w[i].begin(), w[i].end());\n\n            bool flag = true; // Assume the word is consistent initially\n\n            // Check if all characters in the set \'st\' exist in the string \'all\'\n            for(auto x : st)\n            {\n                // If the character \'x\' is not found in \'all\', set flag to false\n                auto it = find(all.begin(), all.end(), x);\n                if(it == all.end()) // If character not found in \'all\'\n                {\n                    flag = false; // Mark the word as inconsistent\n                    break; // Break out of the loop as we found an invalid character\n                }\n            }\n\n            // If the word is consistent (flag remains true), increment the counter\n            if(flag) cnt++;\n        }\n\n        return cnt; // Return the count of consistent strings\n    }\n};\n```\n\n\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n###### Let\'s Connect on LinkedIn: www.linkedin.com/in/shishirrsiam\n###### Let\'s Connect on Facebook: www.fb.com/shishirrsiam
['Array', 'Hash Table', 'String', 'Counting', 'C++']