Easy to understand
\n\n# Approach\n Describe your approach to solving the problem. \n        if it starts with element present in array count++;\n# Complexity\n- Time complexity:O
\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n        if it starts with element present in array count++;\n# Complexity\n- Time complexity:O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int countPrefixes(String[] words, String s) {\n        int count=0;\n\n        for(String word: words){\n            if(s.startsWith(word)) count++;\n        }\n        return count;\n    }\n}\n```
['Java']