Reverse degree of a string 
IntuitionThe idea is to assign more weight to letters that are closer to the end of the alphabet (like 'z', 'y', etc.) and also to letters that appear later in
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
The idea is to assign more weight to letters that are closer to the end of the alphabet (like 'z', 'y', etc.) and also to letters that appear later in the string.

   - Normally, 'a' is 0, 'b' is 1, ..., 'z' is 25.
   - We flip this by using 26 - (s[i] - 'a'), so 'a' becomes 26, 'b' becomes 25, ..., 'z' becomes 1.

Then, to emphasize the position in the string, we multiply this reversed value by (i + 1), giving more importance to characters appearing later in the string.

So, characters that are late in the alphabet and appear late in the string will contribute the most to the final value.

This creates a "reverse weighted sum" based on both character value and position.

# Approach
<!-- Describe your approach to solving the problem. -->
1. Initialize ans = 0.
2. Find the length n of the input string.
3. For each character at index i:
   - Calculate its distance from 'a': s[i] - 'a'
   - Subtract this from 26: 26 - diff
   - Multiply it with its 1-based index: (i + 1)
   - Add the result to ans.
4. Return the final result.

# 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
```c []
int reverseDegree(char* s) {
    int ans=0;
    int n=strlen(s);
    for(int i=0;i<n;i++){
        int diff=s[i]-'a';
        ans+=(26-diff)*(i+1);
    }
    return ans;
}
```
['String', 'C', 'Simulation']