Balanced or Busted? ⚖️🔢 Let’s Find Out! 😂 Python !!
Intuition
The problem requires checking if the sum of digits at even indices
is equal to the sum of digits at odd indices.
Since we only need to traverse the st
# Intuition
 - The problem requires checking if the sum of digits at even indices 
 - is equal to the sum of digits at odd indices.
 - Since we only need to traverse the string once, a simple iteration 
 - with two counters (one for even indices and one for odd) will work efficiently.

# Approach
 1. Initialize two variables: `even` for sum of digits at even indices and `odd` for sum at odd indices.
 2. Iterate through the string:
#    - If the index is even, add the digit to `even`.
#    - If the index is odd, add the digit to `odd`.
 3. Compare both sums and return `True` if they are equal, otherwise return `False`.

# Complexity
 - Time complexity: O(n), where `n` is the length of the input string `num`, since we traverse it once.
 - Space complexity: O(1), as we use only two integer variables for storage.

# Code
```python3 []
class Solution:
    def isBalanced(self, num: str) -> bool:
        even = 0
        odd = 0
        for i in range(0, len(num), 2):
            even += int(num[i])
        for j in range(1, len(num), 2):
            odd += int(num[j])
        return odd == even
```
![girls2 .webp](https://assets.leetcode.com/users/images/ebc303d2-502b-465b-a7c3-107f8f98baca_1743225348.6907892.webp)

['Python3']