Given an array of citation counts, return the H-index, defined by the largest h such that at least h papers have at least h citations each. Sorting the bounded counts makes the threshold easy to check.
citations = array of paper citation counts
H-index value
Example 1:
Input:
citations = [3,0,6,1,5]
Output:
3
Explanation:
There are three papers with at least three citations.
Example 2:
Input:
citations = [1,3,1]
Output:
1
Explanation:
At least one paper has at least one citation.