diff --git a/Array Manipulation(List Max) b/Array Manipulation(List Max) new file mode 100644 index 0000000..4eb7bda --- /dev/null +++ b/Array Manipulation(List Max) @@ -0,0 +1,45 @@ +#!/bin/python3 + +import math +import os +import random +import re +import sys + +# Complete the arrayManipulation function below. +def arrayManipulation(n, queries): + list = [0]*(n+1) + for i in queries: + x, y, incr = i[0],i[1],i[2] + list[x-1] += incr + if((y)<=len(list)): list[y] -= incr; + max = x = 0 + for i in list: + + x=x+i; + if(max