274. H 指数
解法一:排序
class Solution:
def hIndex(self, citations: List[int]) -> int:
citations.sort()
h=0
i = len(citations)-1
while i >=0:
if citations[i] > h:
h += 1
i -= 1
return h最后更新于