So I tried to solve this problem and my solution kept timing out on the tests with huge inputs. I believe one such input was where your array of zeros' count was 100,000 and at least 10,000 lines of math additions you had to do to it.

```
func maxArrayQueries(n: Int, queries: [[Int]]) -> Int {
var zeros = Array(repeating: 0, count: n)
for i in 0..<queries.count {
let startIndex = (queries[i][0]-1)
let endIndex = (queries[i][1]-1)
for j in startIndex...endIndex {
zeros[j] += queries[i][2]
}
}
guard let max = zeros.max() else { return 0 }
return max
}
```

This is my solution and I couldn't think of a way to optimize it further. After hitting this roadblock i researched some and think maybe the additions caused the ints within the array to become too big? So its hitting a BigInt problem in swift? That's my only guess as to what was happening. If anyone could give this a look over I would greatly appreciate it! Thank you in advance for your time.