Use two pointers to find the minimum number of operations to reduce an array to all zeros.
Constraints
Example
```python >>> min_operations_to_zero([1, 1]) 1 >>> min_operations_to_zero([5]) -1 >>> min_operations_to_zero([1, 0, 1]) 1 >>> min_operations_to_zero([2, 2, 2]) 3 >>> min_operations_to_zero([0, 0, 0]) 0 ```
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints