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