Java Easy to Understand Solution
\nclass Solution {\n        public int countPrefixes(String[] words, String s) {\n        \n        int result = 0;\n        for (int i=0; i<=s.length(); i++) {
```\nclass Solution {\n        public int countPrefixes(String[] words, String s) {\n        \n        int result = 0;\n        for (int i=0; i<=s.length(); i++) {\n            String x = s.substring(0, i);\n            for (int j = 0; j<words.length; j++) {\n                if (x.equals(words[j]))\n                    result++;\n            }\n        }\n        return result;\n    }\n}\n```
['Java']