One-liner (count_if)
C++\ncpp\nint prefixCount(vector<string>& ws, string pref) {\n    return count_if(begin(ws), end(ws), [&](const string &w){\n       return w.compare(0, pref.siz
**C++**\n```cpp\nint prefixCount(vector<string>& ws, string pref) {\n    return count_if(begin(ws), end(ws), [&](const string &w){\n       return w.compare(0, pref.size(), pref) == 0; \n    });\n}\n```
['C']