✔️✔️✔️very easy solution - for loop - PYTHON || C++ || JAVA - beats 100%⚡⚡⚡
Code\nPython []\nclass Solution:\n    def scoreOfString(self, s: str) -> int:\n        fin = 0\n        for i in range(len(s) - 1):\n            fin += abs(ord(
# Code\n```Python []\nclass Solution:\n    def scoreOfString(self, s: str) -> int:\n        fin = 0\n        for i in range(len(s) - 1):\n            fin += abs(ord(s[i]) - ord(s[i+1]))\n        return fin\n```\n```C++ []\nclass Solution {\npublic:\n    int scoreOfString(string s) {\n        int fin = 0;\n        for(int i = 0; i < s.size() - 1; i++){\n            fin += abs(s[i] - s[i+1]);\n        }\n        return fin;\n    }\n};\n```\n```Java []\nclass Solution {\n    public int scoreOfString(String s) {\n        int fin = 0;\n        for(int i = 0; i < s.length() - 1; i++){\n            fin += Math.abs(s.charAt(i) - s.charAt(i+1));\n        }\n        return fin;\n    }\n}\n```
['String', 'C++', 'Java', 'Python3']