Optimized simple solution - beats 100%🔥
Complexity
Time complexity: O(N)

Space complexity: O(1)
Code
# 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
```java []
class Solution {
    public int reverseDegree(String s) {
        int res = 0;
        int i = 1;
        for (char c : s.toCharArray()) {
            int t1 = 26 - (c - 'a');
            res += t1 * i++;
        }
        return res;
    }
}
```
['Java']