Simple || CPP || (Datta Bayo)
Nothing To explain Brut force approach.\n\n# Code\n\nclass Solution {\npublic:\n    int countPrefixes(vector<string>& words, string s) {\n        int count =0;\
Nothing To explain Brut force approach.\n\n# Code\n```\nclass Solution {\npublic:\n    int countPrefixes(vector<string>& words, string s) {\n        int count =0;\n        for(int i=0;i<=s.length();i++)\n        {\n            string check  = s.substr(0,i);\n            for(int j=0;j<words.size();j++)\n            {\n                if(check == words[j])\n                {\n                    count ++;\n                }\n            }\n        }\n        return count;\n    }\n};\n```\n![image.png](https://assets.leetcode.com/users/images/6c6ccfc0-eb33-46eb-ade6-309423f0ea1d_1674993659.6548398.png)\n
['C++']