100% Go
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\n# Complexity\n- Tim
# 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\n# Complexity\n- Time complexity: $\\Theta(N)$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n\n- Space complexity: $\\Theta(N)$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nfunc scoreOfString(s string) int {\n\tresult := 0\n\n\tfor i := 0; i < len(s) - 1; i++ {\n\t\tdiff := int(s[i]) - int(s[i+1])\n\n\t\tif diff < 0 {\n\t\t\tdiff = -diff\n\t\t}\n\t\tresult += diff\n\t}\n\n\treturn result\n}\n```
['Go']