0ms, Beats 100%, Hopefully my solution will help everyone with an easy problem solving
IntuitionApproachComplexity
Time complexity:O(n)

Space complexity:O(1)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:O(n)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    int countPrefixes(vector<string>& words, string s) {
        int c=0;
        for(string x : words)
            if(s.substr(0,x.size())==x)
                c++;
        return c;
    }
};
```
['String', 'Iterator', 'C++']