← Questions
Most equal values after shifting one subarray
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Given an array, you may once choose any contiguous subarray and add the same integer (positive or negative) to all of its elements. Return the largest number of equal values the array can then hold. For [2, 4, 6, 2, 4, 7], shifting 4, 6, 2, 4 by -2 gives three 2s.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
