프로그래머스 h-index
-
Level2) H-IndexPS/programmers 2021. 5. 4. 14:05
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 import java.util.Arrays; public class Level2_HIndex { public static int solution(int[] citations) { Arrays.sort(citations); int hIndex = 0; int n = citations.length; for (int i = 0; i = h) { hIndex = h; break; } } return hIndex; } public static void main(String[] args) { int[] citations = {3, 0, 6, 1, 5}; System.out.println(soluti..