You are viewing a single comment's thread. Return to all comments →
Python 3 more clear code
def arrayManipulation(n, queries): my_array = [0] * (n+1) count = 0 temp = 0 for first,last,value in queries: my_array[first-1] += value my_array[last] -= value for item in my_array: count += item if count > temp: temp = count return temp
Seems like cookies are disabled on this browser, please enable them to open this website
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
Python 3 more clear code