You are viewing a single comment's thread. Return to all comments →
Another python translation:
def arrayManipulation(n, queries): arr = [0]*(n+2) for a, b, k in queries: arr[a]+=k arr[b+1]-=k result = acc = 0 for x in arr: acc+=x result = max(result, acc) return result
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 →
Another python translation: