Java || Easy Appraoch
\nclass Solution {\n    public int countPrefixes(String[] words, String s) {\n        int i = 0;\n        int j = 0;\n        int count = 0;\n        for(int k 
```\nclass Solution {\n    public int countPrefixes(String[] words, String s) {\n        int i = 0;\n        int j = 0;\n        int count = 0;\n        for(int k = 0; k < words.length; k++){\n            if(words[k].length() > s.length()){\n                continue;\n            }\n            \n            while(i < words[k].length() && words[k].charAt(i) == s.charAt(j)){\n                i++;\n                j++;\n            }\n            if(i == words[k].length()){\n                count++;\n            }\n            i = 0;\n            j = 0;\n        }\n        return count;\n    }\n}\n```
['String', 'Java']