✅✅Beats 100% | Beginner Friendly 💯
 # Intuition\n<!-- Describe your first thoughts on how to solve this problem.  \n\n -->\n\n\n\n\n\n\n\n\n\n\n# Code\npython []\nclass Solution:\n    def scoreOf
<!-- # Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n<!-- # Approach --> -->\n\n<!-- Describe your approach to solving the problem. -->\n\n<!-- # Complexity -->\n<!-- - Time complexity: -->\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n<!-- - Space complexity: -->\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python []\nclass Solution:\n    def scoreOfString(self, s: str) -> int:\n        res=0\n        for i in range(1,len(s)):\n            res+=abs(ord(s[i]) - ord(s[i-1]))\n        return res\n```
['Python3']