@ElementNotFoundException said in My O(n) time solution use Java:

By definition, index k is his h-index if the summation of all elements from counts[k] to counts[L] is no less than k.

@ElementNotFoundException: Could you kindly elaborate your above statement? Other than that, I think I got your code.

Thanks,

BatCoder.