• + 0 comments

    for some test cases its showing teminated due to timeout what can i do

    def arrayManipulation(n, queries):
        a=[]
        for i in range(n):
            a.append(0)
        for j in queries:
            for k in range(j[0],j[1]+1):
                a[k-1]=a[k-1]+j[2]
        return (max(a))