EASY SOLUTION 0ms /100 beats 
IntuitionApproachMain approach is to first convert string to integer by subtracting the current string value to '0' ASCII value ...Complexity

Time complexity:
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
Main approach is to first convert string to integer by subtracting the current string value to '0' ASCII value ...

# Complexity
- Time complexity:
O(n)

- Space complexity:
O(1)

# Code
```cpp []
class Solution {
public:
    bool isBalanced(string num) {
        int esum = 0, osum = 0;

        for (int i = 0; i < num.length(); i++) {
            int digit = num[i] - '0';  // Convert character to integer

            if (i % 2 == 0) {
                esum += digit;  // Even index (0-based)
            } else {
                osum += digit;  // Odd index (0-based)
            }
        }

        return esum == osum;  // Return true if sums are equal
    }
};

```
['C++']