L2 : H-Index Python

jhyunn·2023년 1월 17일
0

Programmers

목록 보기
31/69

L2 : H-Index Python

https://school.programmers.co.kr/learn/courses/30/lessons/42747

def solution(citations):
    citations.sort()
    n = len(citations)
    for i in range(n):
        if citations[i] >= n-i:
            return n-i
    return 0

citations를 오름차순으로 정렬하고 진행한다.

#Hindex

profile
https://github.com/Sungjeonghyun

0개의 댓글