Given an array A1,A2…AN find the minimum number of operations (possibly zero) required to convert all integers in A to 0.
In one operation, you
- choose a non-negative integer pp (p≥0),
- select at most K indices in the array A, and
- for each selected index i, replace Ai…