C++ 1-liner||0ms beats 100%
Intuition\n Describe your first thoughts on how to solve this problem. \nUse alternating sum; if sum=0 return 1 otherwise 0\n# Approach\n Describe your approach
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nUse alternating sum; if sum=0 return 1 otherwise 0\n# Approach\n<!-- Describe your approach to solving the problem. -->\nUse accumulate with lambda function\n```\n[&, i=1](int sum, char x) mutable{\n    return sum+=(i*=(-1))*(x-\'0\');\n});\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||C++ 1-line using accumulate\n```cpp []\nclass Solution {\npublic:\n    static bool isBalanced(string& num) {\n        return accumulate(num.begin(), num.end(), 0, [&, i=1](int sum, char x) mutable{\n            return sum+=(i*=(-1))*(x-\'0\');\n        })==0;\n    }\n};\n```
['C++']