Count the Number of Consistent Strings Solution in C++
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n^3)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n# Code\n```\nclass Solution {\npublic:\n    int countConsistentStrings(string allowed, vector<string>& words) {\n        int i, j, c=0;\n        for(i=0 ; i<words.size() ; i++)\n        {\n            for(j=0 ; j<words[i].size() ; j++)\n            {\n                if(count(allowed.begin(), allowed.end(), words[i][j])==0)\n                {\n                    break;\n                }\n            }\n            if(j==words[i].size())\n            {\n                c++;\n            }\n        }\n        return c;\n    }\n};\n```\n![upvote new.jpg](https://assets.leetcode.com/users/images/792a2ee3-fa92-4936-9a87-216cd9a9ac02_1682613207.1269994.jpeg)
['C++']