mirror of
https://github.com/20kaushik02/leetcode-gulag.git
synced 2026-01-25 07:34:05 +00:00
last of the day
This commit is contained in:
9
274-h-index/soln.py
Normal file
9
274-h-index/soln.py
Normal file
@@ -0,0 +1,9 @@
|
||||
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
|
||||
Reference in New Issue
Block a user