You are given an array of non-negative integers nums.
The array nums is considered special if there exists an integer x such that there are exactly x elements in nums that are greater than or equal to x.
Return x if the array is special; otherwise, return
Note: The integer
xdoes not necessarily have to be an element innums.
Constraints:
nums.length
nums[i]
You are given an array of non-negative integers nums.
The array nums is considered special if there exists an integer x such that there are exactly x elements in nums that are greater than or equal to x.
Return x if the array is special; otherwise, return
Note: The integer
xdoes not necessarily have to be an element innums.
Constraints:
nums.length
nums[i]