Skip to content

Commit

Permalink
[create (H-Index.py)]
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoojin-An committed Aug 4, 2024
1 parent 9f3c7ac commit 0338507
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Programmers/정렬/H-Index.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def solution(citations):
citations = sorted(citations, reverse=True)

for i in range(len(citations)):
if i + 1 > citations[i]:
return i

return len(citations)

0 comments on commit 0338507

Please sign in to comment.