comefrom: <doocs>0274.H-Index_1.py
code: 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
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_1 = len ( var_0 )
      var_2 = [ 0 ] * ( var_1 + 1 )
      for var_3 in var_0 :
          if var_3 <= var_1 :
              var_2 [ var_3 ] += 1
          else :
              var_2 [ var_1 ] += 1
      var_4 = 0
      for var_5 in range ( var_1 , - 1 , - 1 ) :
          var_4 += var_2 [ var_5 ]
          if var_4 >= var_5 :
              return var_5
      return 0
  