C++ sum
Sum should be zero\n\ncpp []\nclass Solution {\npublic:\n    bool isBalanced(string_view num) {\n        int sum = 0;\n        int sign = 1;\n        for (size_
Sum should be zero\n\n```cpp []\nclass Solution {\npublic:\n    bool isBalanced(string_view num) {\n        int sum = 0;\n        int sign = 1;\n        for (size_t idx = 0; idx != num.size(); ++idx, sign *= -1) {\n            sum += sign * (num[idx] - \'0\');\n        }\n\n        return !sum;\n    }\n};\n```
['C++']