• + 0 comments

    def arrayManipulation(n, queries):

        a = [0]*n
    for x in queries:
        for i in range(x[0]-1,x[1]): a[i]+=x[2]
    return max(a)
    

    I used same approach in python but it says time limit exceeded