Best Soln 👌👇
Approach:\n Describe your approach to solving the problem. \n\n# Complexity\n- Time complexity:O(n)\n Add your time complexity here, e.g. O(n) \n\n- Space compl
# Approach:\n<!-- Describe your approach to solving the problem. -->\n\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```java []\nclass Solution {\n    public boolean isBalanced(String num) {\n        StringBuilder sb = new StringBuilder(num);\n        int EvenSum = 0;\n        int OddSum = 0;\n        for(int i=0; i<sb.length();i+=2){\n            EvenSum += Integer.valueOf(sb.charAt(i)) - \'0\';\n        }\n        for(int i=1; i<sb.length();i+=2){\n            OddSum += Integer.valueOf(sb.charAt(i)) - \'0\';\n        }\n        return (EvenSum==OddSum);\n    }\n}\n```
['Java']