mirror of
https://github.com/20kaushik02/leetcode-gulag.git
synced 2025-12-06 07:24:07 +00:00
last of the day
This commit is contained in:
parent
151d0214ff
commit
97976e2394
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
|
||||||
Loading…
x
Reference in New Issue
Block a user