Most distinct values after shifting each element by at most k

0
Remix

You may add any integer between -k and k to each element of an array, choosing independently for each. Return the largest number of distinct values the array can end up with.

xAITechnical phone screenMediumLast asked Jan 2026
No answer yet. Write the first one; the best answer gets endorsed.