C++|| Easy Approach ||  93% Faster
\nclass Solution {\npublic:\n    int countPrefixes(vector<string>& words, string s) { \n        int ans = 0;\n        for(int i = 0 ; i<words.size() ; i++){\n  
```\nclass Solution {\npublic:\n    int countPrefixes(vector<string>& words, string s) { \n        int ans = 0;\n        for(int i = 0 ; i<words.size() ; i++){\n            string element = words[i];\n            int len = element.length();\n            \n            for(int j = 0 ; j<len ; j++){\n               \n                if(element[j] != s[j]){\n                    break;      \n                }     \n                if(j==len-1){\n                    ans++;\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
[]