Codegolf-like solution
Not really "code golf" by most peoples standards, but I imagine it looks really strange to people unfamiliar with C.Code
Not really "code golf" by most peoples standards, but I imagine it looks really strange to people unfamiliar with C.
# Code
```c []
int scoreOfString(char* s) {
    int sum = 0;
    while(*++s){
        sum += s[-1] > s[0] 
             ? s[-1] - s[0] 
             : s[0] - s[-1];
    }
    return sum;
}
```
['C']