c++ | short | 97% faster than all
\n# Code\n\nclass Solution {\npublic:\n     int countPrefixes(vector<string>& words, string s) {\n        int count = 0;\n        for(auto word:words){\n       
\n# Code\n```\nclass Solution {\npublic:\n     int countPrefixes(vector<string>& words, string s) {\n        int count = 0;\n        for(auto word:words){\n            bool isPrefix = true;\n            for(int i=0; i<word.length(); i++){\n                if(word[i] != s[i]){\n                    isPrefix = false;\n                    break;\n                }\n            }\n            if(isPrefix) count++;\n        }\n    return count;\n    }\n};\n```
['C++']