Leetcode 3346. Maximum Frequency of an Element After Performing Operations I
Given nums, k, and numOperations, you may pick up to numOperations distinct indices and add an integer in [-k, k] to each; find the maximum number of elements that can be made equal after these bounded modifications. The challenge is to group elements that can be shifted to a common value under per-element ±k limits and a hard cap on how many elements you can change (n up to 1e5).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.