Skip to content

Commit f6eb215

Browse files
authored
[20251108] PGM / LV2 / H-Index / 이인희
1 parent ee9319c commit f6eb215

File tree

1 file changed

+20
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)