Simple string methods with Ascii using java
Code


# Code
```java []
class Solution {
    public int reverseDegree(String s) {
       
        String s1="zyxwvutsrqponmlkjihgfedcba";
        
        int sum=0,a=0,b=0;
        for(int i=0;i<s.length();i++){
             a=(int)(s.charAt(i)); // get ASCII 
             b=s1.indexOf(s.charAt(i)); // get reverse order no 
           int mul=(i+1)*(b+1); // index +1 multiply reverse no +1
           sum+=mul;
        }
        return sum;
    }
}
```
['Java']