<doocs>0274.H-Index_1.py
def hIndex( citations: List[int]) -> int:
    n = len(citations)
    cnt = [0] * (n + 1)
    for c in citations:
        if c <= n:
            cnt[c] += 1
        else:
            cnt[n] += 1
    sum = 0
    for i in range(n, -1, -1):
        sum += cnt[i]
        if sum >= i:
            return i
    return 0
def sample_funcname ( var_0 : List [ int ] ) -> int :
    var_4 = len ( var_0 )
    var_7 = [ 0 ] * ( var_4 + 1 )
    for var_8 in var_0 :
        if var_8 <= var_4 :
            var_7 [ var_8 ] += 1
        else :
            var_7 [ var_4 ] += 1
    var_9 = 0
    for var_11 in range ( var_4 , - 1 , - 1 ) :
        var_9 += var_7 [ var_11 ]
        if var_9 >= var_11 :
            return var_11
    return 0
