Skip to content

Commit

Permalink
h-index푸는중
Browse files Browse the repository at this point in the history
  • Loading branch information
sunyeongchoi committed Oct 16, 2020
1 parent 1e67060 commit 9c08aec
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions argorithm/h-index.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
def solution(citations):
answer = 0
while True:
for i in sorted(citations):
pass
return answer
answer = []
cnt = 0
for i in range(len(citations)):
for j in range(len(citations)):
if citations[i] <= citations[j]:
cnt += 1
if citations[i] >= cnt:
answer.append(cnt)
cnt = 0
return max(answer)


if __name__ == '__main__':
real_answer = solution([3, 0, 6, 1, 5])
print(real_answer)

#“나머지 논문이 h번 이하 인용되었다면” 이라는 조건까지 따져보면, 이 조건까지 추가해주자

0 comments on commit 9c08aec

Please sign in to comment.