Adding to two variables on index
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n# Code\n```java []\nclass Solution {\n    public boolean isBalanced(String num) {\n        int odd = 0;\n        int even = 0;\n        for(int i = 0; i<num.length(); i++){\n            if(i%2==0){\n                even += Integer.parseInt(num.charAt(i)+"");\n            }\n            else{\n                odd += Integer.parseInt(num.charAt(i)+"");\n            }\n        }\n        return odd == even;\n    }\n}\n```
['Java']