프로그래머스 연습문제 - H-Index (level2)
def solution(citations):
for i in range(max(citations)):
answer = len(list(filter(lambda x: x >= i, citations)))
if i >= answer:
return answer
15분도 안 걸리고 성공 ~~!!
def solution(citations):
citations = sorted(citations)
l = len(citations)
for i in range(l):
if citations[i] >= l-i:
return l-i
return 0