Company: Mathworks_17july
Difficulty: medium
Array Nullification Problem Description You are given two integer arrays: change of length n , and arr of length m . Both arrays use 1-based indexing . Every element of arr starts out as an ordinary non-negative integer. An element may also be marked NULL , which removes it from play permanently. You perform operations one after another. The operations you perform are numbered 1, 2, 3, ... in the order you perform them, and the operation numbered i is tied to change[i] (inferred - the source never names what i refers to, but its worked example performs its 5th operation using change[5] , its 6th using change[6] and its 8th using change[8] ; operation numbers and change indices are therefore the same thing) . Because of this you can never perform more than n operations, and you may not skip an operation number. As your i -th operation you must do exactly one of the following: Choose any element of arr that is not NULL and whose value is at least 1 , and decrement it by 1 . If change[i]