C++ | with explanation  | easy
Explanation-\nCheck if word contains pref, and if it contains then it should be at 0th position\n\n\nclass Solution {\npublic:\n    int prefixCount(vector<strin
**Explanation-**\nCheck if word contains pref, and if it contains then it should be at ```0th``` position\n\n```\nclass Solution {\npublic:\n    int prefixCount(vector<string>& words, string pref) {\n        int ans=0;\n        for(auto & word:words)\n            if(word.find(pref)==0)\n                ans++;\n        return ans;\n    }\n};\n```\nDo **UPVOTE** if it helps :)
['C']