[Programmers] H-Index
Python
def solution(citations):
citations.sort()
for i in range(len(citations)):
if citations[i] >= len(citations) - i:
return len(citations) - i
return 0
def solution(citations):
citations.sort()
for i in range(len(citations)):
if citations[i] >= len(citations) - i:
return len(citations) - i
return 0
댓글남기기