O(N) easy solution in python
Time complexity: O(N)\n\n- Space complexity: O(N)\n\n# Code\npython3 []\nclass Solution:\n    def isBalanced(self, num: str) -> bool:\n        odd,even = 0,0\n 
- Time complexity: O(N)\n\n- Space complexity: O(N)\n\n# Code\n```python3 []\nclass Solution:\n    def isBalanced(self, num: str) -> bool:\n        odd,even = 0,0\n        for odd_num in range(1,len(num),2):\n          odd += int(num[odd_num])\n        for even_num in range(0,len(num),2):\n          even += int(num[even_num])\n        return even==odd\n```
['Python3']