Built-in Function
Complexity
Time complexity:O(N)

Space complexity:O(1)
Code


# 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
```java []
class Solution {
    public int countPrefixes(String[] words, String s) { 
      int count=0;
        for(int i=0;i<words.length;i++){ 
            if(s.startsWith(words[i])) 
                count++; 
        } 
        return count;
    }
}
```
['Java']