From 66993d1feeb01c245e437547d00eb8d50ce210ca Mon Sep 17 00:00:00 2001 From: zinnnn37 Date: Tue, 18 Nov 2025 23:50:25 +0900 Subject: [PATCH] =?UTF-8?q?[20251118]=20PGM=20/=20LV2=20/=20H-Index=20/=20?= =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A7=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zinnnn37/202511/18 PGM LV2 H-Index.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 zinnnn37/202511/18 PGM LV2 H-Index.md diff --git a/zinnnn37/202511/18 PGM LV2 H-Index.md b/zinnnn37/202511/18 PGM LV2 H-Index.md new file mode 100644 index 00000000..ff6db842 --- /dev/null +++ b/zinnnn37/202511/18 PGM LV2 H-Index.md @@ -0,0 +1,21 @@ +```java +import java.util.Arrays; + +public class PGJ_LV2_H_Index { + + private static int len; + + public int solution(int[] citations) { + int answer = 0; + len = citations.length; + Arrays.sort(citations); + + for (int i = 0; i < len; i++) { + int h = Math.min(len - i, citations[i]); + answer = Math.max(answer, h); + } + return answer; + } + +} +``` \ No newline at end of file