✅ Easy and Fast C++ Solution
Approach\nUsing s.find(words[i]) function which returns the index of words[i] if it is present in the string s , and to check whether words[i] occurs as a prefi
# Approach\nUsing **s.find(words[i])** function which returns the index of words[i] if it is present in the string s , and to check whether words[i] occurs as a prefix use **s.find(words[i])==0**  ( since prefix always occurs at index 0).\n\n# Code\n```\nclass Solution {\npublic:\n    int countPrefixes(vector<string>& words, string s) {\n\n      int countPrefix = 0;\n\n      for(int i=0;i<words.size();++i){\n          if(s.find(words[i])!=string::npos && s.find(words[i])==0){\n              countPrefix++;\n          }\n      }  \n      return countPrefix;\n    }\n};\n```
['C++']