📝 문제
💦 풀이 실패
import java.util.Arrays;
class Solution {
public int solution(int[] citations) {
Arrays.sort(citations);
int answer = 0;
for (int i = 0; i < citations.length; i++) {
int h = citations.length - i;
if (citations[i] >= h) {
answer = h;
break;
}
}
return answer;
}
}
다음 포스팅을 참고하였습니다.
'스터디 > 99클럽 코테 스터디 TIL' 카테고리의 다른 글
99클럽 코테 스터디 14일차 TIL 숫자 카드2 (0) | 2024.08.04 |
---|---|
99클럽 코테 스터디 13일차 TIL 숫자 카드 (0) | 2024.08.04 |
99클럽 코테 스터디 11일차 TIL 카드 뭉치 (0) | 2024.08.01 |
99클럽 코테 스터디 10일차 TIL 이중우선순위큐 (0) | 2024.08.01 |
99클럽 코테 스터디 9일차 TIL 더 맵게 (0) | 2024.07.31 |