Java beats 100%
Java beats 100%\n\n\n\n# Code\n\nclass Solution {\n    public int scoreOfString(String s) {\n        return iterateString(0,s);   \n    }\n\n    public static i
Java beats 100%\n![image.png](https://assets.leetcode.com/users/images/0253c27c-ff43-46f6-b53a-d8c0fce70b6a_1717219094.0910015.png)\n\n\n# Code\n```\nclass Solution {\n    public int scoreOfString(String s) {\n        return iterateString(0,s);   \n    }\n\n    public static int iterateString(int n, String s){\n        if(n == s.length() -1 )\n            return 0;\n        return Math.abs(s.charAt(n) - s.charAt(n+1)) + iterateString(n+1, s);\n    }\n}\n```
['Java']