Java Solution beats 99.04%
IntuitionFind even index and odd index then add sumApproachSo we will run two for loops first start from 0th index as even and will increment counter each time
# Intuition
Find even index and odd index then add sum 

# Approach
So we will run two for loops first start from 0th index as even and will increment counter each time by i+2 for skip one odd index and for odd index we will start from 1st index and will keep addiing respeciveli in evenSum and OddSum and in last will 
return evenSum == oddSum 


Another approach we can use is that use if loop and find index of even digit by i%2 == 0 then add these digits in evenSum and else in oddSum bur for converting char into int we need to use this 

oddSum = oddSum + (nums[i] -'0'); so we will get correct integer value 



# Code
```java []
class Solution {
    public boolean isBalanced(String num) {
        int eSum = 0;
        int oSum =0;

        for(int i =0; i<num.length(); i=i+2){
            eSum = eSum + (num.charAt(i) - '0');
        }
        for(int i =1 ; i<num.length(); i=i+2){
            oSum = oSum + (num.charAt(i) -'0');
        }
        return eSum == oSum;
       
    }
}

//2nd approach
class Solution {
    public boolean isBalanced(String num) {
        char[] nums = num.toCharArray();
        int eSum = 0;
        int oSum =0;

        for(int i =0; i<nums.length; i++){
            if( i%2 == 0){
                eSum = eSum + (nums[i] - '0');
                 
            }else{
                oSum = oSum + (nums[i] - '0');
                
            }
        }
        System.out.println(eSum);
        System.out.println(oSum);
        return eSum == oSum;
    }
}
```


['Java']