C++ Solution || Simple Approach
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int prefixCount(vector<string>& words, string pref) {\n        \n\n    int prefix_size = pref.size();\n    int n=words.size();\n    int count = 0;\n    for (int i = 0; i < n; i++)\n    {\n        string s1 = words[i].substr(0, prefix_size);\n        if (s1 == pref)\n        {\n            count++;\n        }\n    }\n    return count;\n\n\n    }\n};\n```
['C++']