Easy & Clear Solution (Java, c++, Python3)
\n\n### C++ \ncpp\nclass Solution {\npublic:\n    bool isBalanced(string num) {\n        int evenSum = 0, oddSum = 0;\n        for (int i = 0; i < num.length();
\n\n### C++ \n```cpp\nclass Solution {\npublic:\n    bool isBalanced(string num) {\n        int evenSum = 0, oddSum = 0;\n        for (int i = 0; i < num.length(); i++) {\n            if (i % 2 == 0) {\n                evenSum += num[i] - \'0\'; // Convert char to int\n            } else {\n                oddSum += num[i] - \'0\'; // Convert char to int\n            }\n        }\n        return evenSum == oddSum;\n    }\n};\n```\n\n### Python \n```python\nclass Solution:\n    def isBalanced(self, num: str) -> bool:\n        even_sum = 0\n        odd_sum = 0\n        for i in range(len(num)):\n            if i % 2 == 0:\n                even_sum += int(num[i])  # Convert char to int\n            else:\n                odd_sum += int(num[i])   # Convert char to int\n        return even_sum == odd_sum\n```\n\n# Java\n\n```java\nclass Solution {\n    public boolean isBalanced(String num) {\n        int evenSum = 0, oddSum = 0;\n        for (int i = 0; i < num.length(); i++) {\n            if (i % 2 == 0) {\n                evenSum += num.charAt(i) - \'0\';\n            } else {\n                oddSum += num.charAt(i) - \'0\';\n            }\n        }\n        return evenSum == oddSum;\n    }\n}\n```\n\n### Brief Logic Explanation:\n1. **Initialization**: Two variables (`evenSum` and `oddSum`) are initialized to hold the sums of digits at even and odd indices.\n2. **Iteration**: A loop goes through each character in the string:\n   - If the index is even, the digit at that index is added to `evenSum`.\n   - If the index is odd, it is added to `oddSum`.\n3. **Comparison**: Finally, the function checks if `evenSum` equals `oddSum` and returns the result as a boolean.
['Python', 'C++', 'Java', 'Python3']