cpp 🔥
Code
# Code
```cpp []
class Solution {
public:
    int reverseDegree(string s) {
        string str = "zyxwvutsrqponmlkjihgfedcba";

        int reverseDegree = 0;
        for (int i = 0; i < s.length(); ++i) {
            int x = str.find(s[i]) + 1, y = (i + 1);
            reverseDegree += (x * y);
        }

        return reverseDegree;
    }
};
```
['String', 'C++']