Simple thought...
IntuitionThe problem requires us to calculate the sum of the absolute differences between the ASCII values of adjacent characters in a string. Since the ASCII v
# Intuition
The problem requires us to calculate the sum of the absolute differences between the ASCII values of adjacent characters in a string. Since the ASCII value of a character can be obtained using ord(), we can iterate through the string, compute these differences, and accumulate the sum.
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
1.Initialize a variable m to store the total score.
2.Determine the length of the string n.
3.Iterate over the string from index 0 to n-2 (so that we always have a valid adjacent character).
4.Compute the absolute difference between the ASCII values of adjacent characters and add it to m.
5.Return the final computed score.
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:$$O(n)$$
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:$$O(1)$$
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def scoreOfString(self, s: str) -> int:
        m=0
        n=len(s)
        for i in range(n-1):
            m+=abs(ord(s[i])-ord(s[i+1]))
        return m
```
['Python3']