diff --git a/alstjr7437/README.md b/alstjr7437/README.md index d2270eb1..91271072 100644 --- a/alstjr7437/README.md +++ b/alstjr7437/README.md @@ -26,4 +26,4 @@ | 22차시 | 2024.04.13 | BFS | 연결 요소의 개수 | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/78 | | 23차시 | 2024.05.01 | 큐 | 프로세스 | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/79 | | 24차시 | 2024.05.14 | BFS | 토마토 | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/187 | -| 26차시 | 2024.05.22 | 브루트포스 | 테트로미노 | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/196 | \ No newline at end of file +| 26차시 | 2024.05.22 | 정렬 | H-Index | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/196 | \ No newline at end of file diff --git "a/alstjr7437/\353\270\214\353\243\250\355\212\270\355\217\254\354\212\244/\355\205\214\355\212\270\353\241\234\353\257\270\353\205\270.py" "b/alstjr7437/\353\270\214\353\243\250\355\212\270\355\217\254\354\212\244/\355\205\214\355\212\270\353\241\234\353\257\270\353\205\270.py" deleted file mode 100644 index e69de29b..00000000 diff --git "a/alstjr7437/\354\240\225\353\240\254/H-Index.py" "b/alstjr7437/\354\240\225\353\240\254/H-Index.py" new file mode 100644 index 00000000..425c659c --- /dev/null +++ "b/alstjr7437/\354\240\225\353\240\254/H-Index.py" @@ -0,0 +1,8 @@ +def solution(citations): + citations.sort(reverse=True) + + for i in range(len(citations)): + if(citations[i] < i+1): + return i + + return len(citations) \ No newline at end of file