Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 26 |
27 | 28 | 29 | 30 |
Tags
- 백준
- CMD
- to display the conditions report re-run your application with 'debug' enabled
- 호석이두마리치킨
- 설정
- 2167. 2차원 배열의 합
- documentationpluginsbootstrapper
- 프로그래머스
- Error
- 14466
- jenkins
- 20055
- Java
- dockercompose
- 소가길을건너간이유6
- SpringBoot
- Eclipse
- 투에모스문자열
- 21278
- 별자리 만들기
- 날짜일수
- 자바
- EC2
- 이클립스
- docker
- 알고리즘
- 2108_통계학
- 18222
- Error fetching remote repo 'origin'
- 이산수학
Archives
- Today
- Total
목록H-index (1)
계단을 오르듯이
[JAVA] 프로그래머스 - H-Index
h의 범위가 될 수 있는 최대의 범위는 citations 배열의 길이만큼이므로 0부터 길이까지만큼 탐색한다. 배열은 오름차순으로 정렬한 후 해당 배열의 큰 수부터(뒤에서부터) 탐색하여 해당 수만큼의 개수를 만족하면 빠져나오고 answer의 값을 갱신해주고, 더 이상 만족하지 못할 시 모든 탐색을 종료한다. 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.*; class Solution { public int solution(int[] citations) { int answer = 0; int len = citations.length; Arrays.sort(citations); for(int i=0;i=0;..
알고리즘/프로그래머스
2022. 2. 2. 22:22