• + 0 comments

    can someone tell me why 5 tests failed(but other 11 tests were passed) after i submitted the code.

    def arrayManipulation(n, queries):
        arr = [0] * (n + 1)
        for left, right, value in queries:
            while left<=right:
                arr[left-1] += value
                left += 1
        max_value = max(arr)
        return max_value