199. H-Index
MediumSorting
Given an array of integers citations where citations[i] is the number of citations a researcher received for their ith paper, return the researcher's h-index. The h-index is defined as the maximum value of h such that the given researcher has published at least h papers that have each been cited at least h times.
Examples
Input: [3,0,6,1,5]
Output: 3
Explanation: Three papers have at least 3 citations each.
Constraints
- n == citations.length
- 1 <= n <= 5000
- 0 <= citations[i] <= 1000
Loading...
Run checks all cases above. Submit evaluates all test cases.