๋ฌธ์
https://school.programmers.co.kr/learn/courses/30/lessons/42747
ํ์ด
# ํ๋ก๊ทธ๋๋จธ์ค 2๋จ๊ณ - H-Index
def solution(citations):
citations.sort()
length = len(citations)
for i in range(length):
if citations[i] >= length-i:
return length-i
return 0
print(solution([3,0,6,1,5]))
'๐๏ธ Algorithm > โฌ ํ๋ก๊ทธ๋๋จธ์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
โฌ [Programmers] [Python] Level2_์์ฅ (0) | 2023.04.06 |
---|---|
โฌ [Programmers] [Python] Level2_๊ทค ๊ณ ๋ฅด๊ธฐ (0) | 2023.04.06 |
โฌ [Programmers] [BFS/DFS] [Python] Level3_๋คํธ์ํฌ (0) | 2023.02.11 |
โฌ [Programmers] [DP] [Python] Level3_์ ์ ์ผ๊ฐํ (0) | 2023.02.11 |
โฌ [Programmers] [2022 KAKAO TECH INTERNSHIP] [Python] Level2_๋ ํ ํฉ ๊ฐ๊ฒ ๋ง๋ค๊ธฐ (0) | 2022.12.16 |