NO BRAINING AT ALL
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n$$O(n)$$\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$$O(1)$$\n# Code\n``` javascript []\nvar scoreOfString = function(s) {\n    let sum = 0;\n    let prev = s.charCodeAt(0)  \n    for(let i=1; i<s.length; i++) {\n        sum += Math.abs(prev - s.charCodeAt(i));\n        prev = s.charCodeAt(i);\n    }\n    return sum;\n};\n```\n``` cpp []\nclass Solution {\npublic:\n    int scoreOfString(string s) {\n        int sum = 0;\n        int prev = s[0];\n        for(int i=1; i<s.size(); i++) {\n            sum += abs(prev - s[i]);\n            prev = s[i];\n        }\n        return sum;\n    }\n};\n```
['String', 'C++', 'JavaScript']