Fairly Easy Hashmap Solution (Python 3)
IntuitionI saw that we were assigning values to char's, and then if you read the constraints we only need to worry about lowercase. So we don't need to do some
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
I saw that we were assigning values to char's, and then if you read the constraints we only need to worry about lowercase. So we don't need to do some weird .lower() stuff in our logic somewhere. To me it seemed most obvious to just make a hashmap then, and assign the values(keys) the problem tells you. So 26 for A, 25 for B, ... 1 for Z.
Then we've just gotta somehow add the value from the keys in our hash map, and after re reading I only noticed how we have to multiply by the index. And the 1-index thing just means we're starting with index=1, where it would normally be index=0. So we'll have to do a little something to accomodate that but nothing crazy.
# Approach
<!-- Describe your approach to solving the problem. -->
So we just make our hashmap which is pretty annoying to setup but also makes it really obvious what you're doing at least.

Then we create an int to add our values multiplied by our index to for our answer. So we just want this set to 0 so we can += to it easily. 

Then the weirdest part probably is we need to define our index, outside of the loop, which feels kind of wrong in python lol. And since we're 1-indexed as it told us, we just set the index to 1 — i=1

Now we loop through our string for each character in it. For each character, we add to total: the value associated with our key (char from string) multiplied by the index where we found that key. 

Add one to the index count each time we go through a character from the string to keep index properly updated. Since we're using it to get the value we're adding to the total, everything will be busted otherwise.

Finally we can return the total, which is returned after multiplying the key's value by the key's index, for every character/key in the string.
# 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
```python3 []
class Solution:
    def reverseDegree(self, s: str) -> int:
        hashy = {'a': 26, 'b':25, 'c': 24,'d': 23, 'e': 22, 'f':21, 'g':20 , 'h':19 ,'i':18 ,'j':17 ,'k':16 ,'l':15 ,'m':14 ,'n':13 ,'o':12 ,'p':11 ,'q':10 ,'r':9 ,'s':8 ,'t':7 ,'u': 6,'v': 5,'w': 4, 'x': 3, 'y': 2, 'z': 1}
        total = 0
        i = 1
        for x in s:
            total += hashy[x] * i
            i+= 1
        return total
        
```
['Python3']