You are given an integer array nums and two integers k and numOperations.
You can perform at most numOperations operations on the array. In each operation, you choose an index i that has not been chosen in any previous operation and add an integer from the range nums[i].
Return the maximum possible frequency of any element in nums after performing at most numOperations operations.
Constraints:
nums.length
nums[i]
k
numOperations nums.length
You are given an integer array nums and two integers k and numOperations.
You can perform at most numOperations operations on the array. In each operation, you choose an index i that has not been chosen in any previous operation and add an integer from the range nums[i].
Return the maximum possible frequency of any element in nums after performing at most numOperations operations.
Constraints:
nums.length
nums[i]
k
numOperations nums.length