Amazon - SWE interveiw

Given an integer array values and integer k - maximize occurrances of k.

For any subarray - you can ± all values in the subarrary by any value (value applies to all elements in subarray).

You can only ± by a value in one subarray. Maximize occurrances of k.