0ms 100% O(N)
Parse the string, applying the reverse degree formula.Time complexity: O(N)
Space complexity: O(1)Code

Parse the string, applying the reverse degree formula.

Time complexity: O(N)
Space complexity: O(1)

# Code
```cpp []
class Solution {
public:
    int reverseDegree(string s) {
        int reverse_degree = 0;
        const int n = s.size();

        for (int i = 0; i < n; ++i) {
            reverse_degree += (i + 1) * ('z' - s[i] + 1);
        }
        return reverse_degree;
    }
};
```
['C++']