👏Beats 99.97% of users with Java
\n# Code\n\nclass Solution {\n    public int scoreOfString(String s) {\n        int sum=0;\n        for(int i=0;i<s.length()-1;i++){\n            sum+= Math.abs
\n# Code\n```\nclass Solution {\n    public int scoreOfString(String s) {\n        int sum=0;\n        for(int i=0;i<s.length()-1;i++){\n            sum+= Math.abs(s.charAt(i)-s.charAt(i+1));\n        }\n     return sum;   \n    }\n}\n```\n# Please upvote \uD83D\uDC46
['Java']