Skip to content

Commit 4a1a7bd

Browse files
authored
[20251101] PGM / LV2 / H-Index / 강신지
1 parent 788ee40 commit 4a1a7bd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

ksinji/202511/1 PGM H-Index.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
```java
2+
import java.util.*;
3+
4+
class Solution {
5+
public int solution(int[] citations) {
6+
Arrays.sort(citations);
7+
8+
for (int i=0; i<citations.length; i++){
9+
int h = citations.length - i;
10+
11+
if (citations[i] >= h){
12+
return h;
13+
}
14+
}
15+
16+
return 0;
17+
}
18+
}
19+
```

0 commit comments

Comments
 (0)