Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Count the number of elements greater than or equal to x for each x in the range [0, nums.length].
If for any x, the condition satisfies, return that x. Otherwise, there is no answer.