Search
⌘K

Leetcode 2779. Maximum Beauty of an Array After Applying Operation

Given nums and k where each element can be changed once to any integer in [nums[i]-k, nums[i]+k], find the maximum length of a subsequence of equal values you can obtain — equivalently, determine the value x that lies in the largest number of intervals [nums[i]-k, nums[i]+k] (maximum interval overlap).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.