We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
fromitertoolsimportaccumulatedefarrayManipulation(n,queries):# Write your code herearr=[0for_inrange(n)]fora,b,kinqueries:arr[a-1]+=kifb!=n:arr[b]-=kreturnmax(accumulate(arr))
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
Python 3: I watched this : https://www.youtube.com/watch?v=4wqDE1zNUwc