Python3 || 2 lines, map and separate  || T/S: 99% / 96%
Here\'s the plan:\n1. We map the characters in num to integers.\n\n1. We sum the even-indexed elements of num and we sum the even-indexed elements of num, and t
Here\'s the plan:\n1. We map the characters in `num` to integers.\n\n1. We sum the even-indexed elements of `num` and we sum the even-indexed elements of `num`, and then we return whether they are equal. \n ___\n\n```python3 []\nclass Solution:\n    def isBalanced(self, num: str) -> bool:\n\n        num = list(map(int, num))\n        \n        return sum(num[0:len(num):2]) == sum(num[1:len(num):2])\n```\n```cpp []\nclass Solution {\npublic:\n    bool isBalanced(std::string num) {\n        int evenSum = 0;\n        int oddSum = 0;\n\n        for (size_t i = 0; i < num.length(); ++i) {\n            int digit = num[i] - \'0\';\n            if (i % 2 == 0) {\n                evenSum += digit;} else {\n                oddSum += digit;}\n        }\n\n        return evenSum == oddSum;}\n};\n```\n```java []\nclass Solution {\n    public boolean isBalanced(String num) {\n        int evenSum = 0;\n        int oddSum = 0;\n\n        for (int i = 0; i < num.length(); i++) {\n            int digit = num.charAt(i) - \'0\'; // Convert char to int\n            if (i % 2 == 0) {\n                evenSum += digit; } \n            else {\n                oddSum += digit; }\n        }\n        return evenSum == oddSum;}\n}\n```\n[https://leetcode.com/problems/check-balanced-string/submissions/1449986452/\n](https://leetcode.com/problems/check-balanced-string/submissions/1449986452/\n)\nI could be wrong, but I think that time complexity is *O*(*N*) and space complexity is *O*(*N*), in which *N* ~ `len(num)`.
['C++', 'Java', 'Python3']