Easy beats 100%
Intuition\n Describe your first thoughts on how to solve this problem. \nBasic Implementation based problem\n# Approach\n Describe your approach to solving the 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nBasic Implementation based problem\n# Approach\n<!-- Describe your approach to solving the problem. -->\nJust compute the sums in even and odd positions and check if they are equal or not\n# Complexity\n- Time complexity:- $O(n)$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:- $O(1)$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    bool isBalanced(string num) {\n        int n=num.size(),e=0,o=0;\n        for(int i=0;i<n;++i)\n            {\n                if(i&1)\n                    o+=(num[i]-\'0\');\n                else\n                    e+=(num[i]-\'0\');\n            }\n        //cout<<o<<" "<<e<<"\\n";\n        return o==e;\n    }\n};\n```\n```java []\nclass Solution {\n    public boolean isBalanced(String num) {\n        int n=num.length();\n        int e=0,o=0;\n        for (int i=0;i<n;++i) \n        {\n            if((i&1)!=0)\n                o+=num.charAt(i)-\'0\';\n            else\n                e+=num.charAt(i)-\'0\';\n        }\n\n        return o==e;\n    }\n}\n```\n```python3 []\nclass Solution:\n    def isBalanced(self, num: str) -> bool:\n        e=0\n        o=0 \n        for i in range(len(num)):\n            if (i&1)!=0:\n                o+=int(num[i])\n            else:\n                e+=int(num[i])\n\n        return o==e\n```
['String', 'C++', 'Java', 'Python3']