Nice and Easy | O(1) space Complexity | good solution | beats 100%
Intuition-71 for reaching 25 then -((ch-91) * 2) for reversing the indexing
just use pen and papperComplexity

Time complexity:
O(n)


Space complexity:
O(1)

C
# Intuition
-71 for reaching 25 then -((ch-91) * 2) for reversing the indexing 
just use pen and papper




# Complexity
- Time complexity:
 $$O(n)$$ 

- Space complexity:
 $$O(1)$$

# Code
```java []
class Solution {
    public int reverseDegree(String s) {
        int n = s.length();
        int degree = 0;
        for(int i=0;i<n;i++){
            char ch = s.charAt(i);
            int val = ch - 71-( (ch-97) * 2 );
            degree = degree + (i+1)*val;
        }
        return degree;
    }
}
```
['Java']