Given the sorted integer array citations, return the researcher’s h-index.
The h-index is the largest value h such that the researcher has at least h papers with at least h citations each.
Note:
citationsis sorted in ascending order.
Constraints:
n == citations.length
n
citations[i]
citations is sorted in ascending order
Given the sorted integer array citations, return the researcher’s h-index.
The h-index is the largest value h such that the researcher has at least h papers with at least h citations each.
Note:
citationsis sorted in ascending order.
Constraints:
n == citations.length
n
citations[i]
citations is sorted in ascending order