You are given an integer array nums.
You can increase the value of any element in nums by at most
After applying any number of these operations, select a collection of elements from the resulting array such that they form a sequence of consecutive integers when sorted in ascending order.
Return the maximum number of elements you can select.
Constraints:
nums.length
nums[i]
You are given an integer array nums.
You can increase the value of any element in nums by at most
After applying any number of these operations, select a collection of elements from the resulting array such that they form a sequence of consecutive integers when sorted in ascending order.
Return the maximum number of elements you can select.
Constraints:
nums.length
nums[i]