Java easy solutions
IntuitionThe problem seems to involve computing a weighted sum based on the reverse alphabetical position of characters in a string.ApproachFor each character i
# Intuition
The problem seems to involve computing a weighted sum based on the reverse alphabetical position of characters in a string.

# Approach
For each character in the string:
- Calculate its reverse alphabetical index (i.e., 'z' - character + 1).
- Multiply it by its 1-based position in the string.
- Accumulate the result into a total sum.

# Complexity
- Time complexity: O(n), where n is the length of the string.
- Space complexity: O(1), constant extra space used.

# Code
```java []
class Solution {
    public int reverseDegree(String s) {
        int sum = 0;
        for (int i = 0; i < s.length(); i++) {
            int revIdx = 'z' - s.charAt(i);
            revIdx++;
            sum += (i + 1) * revIdx;
        }
        return sum;
    }
}
```
['Java']