Simple Swift Solution
Code
![Screenshot 2025-03-27 at 2.22.15 PM.png](https://assets.leetcode.com/users/images/cde7e7e2-9c7c-4fef-8b22-187bfdd933fa_1743074566.2577815.png)


# Code
```swift []
class Solution {
    func isBalanced(_ num: String) -> Bool {
        var digits = Array(num), evenSum = 0, oddSum = 0
        for i in 0..<digits.count {
            if i % 2 == 0 {
                oddSum += digits[i].wholeNumberValue!
            } else {
                evenSum += digits[i].wholeNumberValue!
            }
        }
        return evenSum == oddSum
    }
}
```
['Swift']