프로그래머스 H-Index - java


프로그래머스 H-Index - java

import java.util.*; class Solution { public int solution(int[] citations) { int answer = 0; Arrays.sort(citations); int h = 0; for (int i = citations.length-1 ; i >= 0 && h <= citations[i] ; i--) { h++; } if (h > citations[citations.length-h] ) { h--; } answer = h; return answer; } } 프로그래머스 코딩 테스트 연습, https://school.programmers.co.kr/learn/challenges...

프로그래머스 H-Index - java에 대한 요약내용입니다.

자세한 내용은 아래에 원문링크를 확인해주시기 바랍니다.



원문링크 : 프로그래머스 H-Index - java