One String Kotlin Solution :)
ApproachGetting the sum of absolute difference between two adjacent charsComplexity
Time complexity: O(n)

Space complexity: O(1)
Code
<!-- # Intuition -->
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
Getting the sum of absolute difference between two adjacent chars
<!-- 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
```kotlin []
class Solution {
    fun scoreOfString(s: String) = (0..<s.lastIndex).sumOf { abs(s[it].code - s[it + 1].code) }
}
```
['Kotlin']