We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8504ccc commit 66993d1Copy full SHA for 66993d1
1 file changed
zinnnn37/202511/18 PGM LV2 H-Index.md
@@ -0,0 +1,21 @@
1
+```java
2
+import java.util.Arrays;
3
+
4
+public class PGJ_LV2_H_Index {
5
6
+ private static int len;
7
8
+ public int solution(int[] citations) {
9
+ int answer = 0;
10
+ len = citations.length;
11
+ Arrays.sort(citations);
12
13
+ for (int i = 0; i < len; i++) {
14
+ int h = Math.min(len - i, citations[i]);
15
+ answer = Math.max(answer, h);
16
+ }
17
+ return answer;
18
19
20
+}
21
+```
0 commit comments