mirror of
https://github.com/20kaushik02/leetcode-gulag.git
synced 2025-12-06 06:34:06 +00:00
10 lines
197 B
Python
10 lines
197 B
Python
def hIndex(self, citations: list[int]) -> int:
|
|
cs = sorted(citations, reverse=True)
|
|
h = 0
|
|
for x in cs:
|
|
if x > h:
|
|
h += 1
|
|
else:
|
|
break
|
|
return h
|