Medium
Given an array citations where citations[i] is the number of citations for the i-th paper, return the researcher's h-index: the maximum h such that h papers have at least h citations each.
Input: citations = [3,0,6,1,5] Output: 3
Input: citations = [1,3,1] Output: 1