Easy python solution beats 100.00% submissions
ApproachCount the number of strings in the words list that start with the given prefix. For each word in the list, we check whether the prefix matches the first
# Approach
Count the number of strings in the words list that start with the given prefix. For each word in the list, we check whether the prefix matches the first n characters of the word, where n is the length of pref.

# Complexity
Time Complexity: O(N×M), where: N is the number of words in the list.
M is the average length of the words. Each word comparison involves checking up to the length of the prefix. M in the worst case.

Space Complexity: O(1) as no additional space proportional to the input size is used.

# Code
```python3 []
class Solution:
    def prefixCount(self, words: List[str], pref: str) -> int:
        result = 0
        n = len(pref)
        for i in range(len(words)):
            if(words[i][0:n] == pref):
                result += 1
        return result
```
['Python3']