I use the same algorithm for Java & Golang, java is accepted with 3ms, but Golang TLE; why?
Why golang solution TLE

I have the same problem. Here is my code TLE on 17/th test case:
Hi @administrators , can you guys take a look? This is the Golang implementation as the top 5 solutions
func getModifiedArray(length int, updates [][]int) []int { res := make([]int, length) for j:=0; j < len(res); j++ { res[j] = 0 } for _, update := range updates { value, start, end := update[2], update[0], update[1] res[start] += value if end < length  1 { res[end+1] = value } } sum := 0 for i:=0; i < length; i++ { sum += res[i] res[i] = sum } return res }
