C++ most optimal solution out there (source: trust me bro)
\n\n# Intuition\nidk \n\n# Approach\njust loop through one time and uhhh do the math thingy :ppp\n\n# Complexity\n- Time complexity:\nO(n) (because i said so)\n
![image.png](https://assets.leetcode.com/users/images/57daae3b-7c53-41d7-9c1f-15f199ebf6f9_1717219559.0796938.png)\n\n# Intuition\nidk \n\n# Approach\njust loop through one time and uhhh do the math thingy :ppp\n\n# Complexity\n- Time complexity:\nO(n) (because i said so)\n\n- Space complexity:\nO(1); and if it happens to be anything else, nuh uh\n\n# Code\n```\n#define LEETCODE class\n#define BEGIN {\n#define END }\n#define RESTYPE int \n#define SEQ string\n#define SUS 0\n#define DEMENTED for \n#define YEET return\n#define DEF_NOT_ABSOLUTE abs\n#define WALRUS =\n#define LMAO scoreOfString \n#define MMMMOOOOOOAAAAAAAAAAIIIIIIIIIIII public\n#define SOLVE_DEEZ Solution\n#define GETLENMINUS1 .size() - 1\n#define SEMICOLON ;\n#define PLUS +\n#define PLUSPLUS ++\n#define NOTPLUS -\n#define PLUSTIMES +=\n\nLEETCODE SOLVE_DEEZ BEGIN\nMMMMOOOOOOAAAAAAAAAAIIIIIIIIIIII:\n    RESTYPE LMAO(SEQ s) BEGIN\n        RESTYPE E WALRUS SUS SEMICOLON\n        DEMENTED (RESTYPE I BEGIN END SEMICOLON I < s GETLENMINUS1 SEMICOLON I PLUSPLUS)\n            E PLUSTIMES DEF_NOT_ABSOLUTE(s[I] NOTPLUS s[I PLUS 1]) SEMICOLON\n        YEET E SEMICOLON\n    END\nEND SEMICOLON\n```
['C++']