File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import java .util .*;
2+
3+ class Solution {
4+ public int [] solution (int [] array , int [][] commands ) {
5+ int [] ans = new int [commands .length ];
6+
7+ for (int a = 0 ; a < commands .length ; a ++) {
8+ int i = commands [a ][0 ] - 1 ;
9+ int j = commands [a ][1 ];
10+ int k = commands [a ][2 ];
11+ int [] temp = Arrays .copyOfRange (array , i , j );
12+ Arrays .sort (temp );
13+
14+ ans [a ] = temp [k -1 ];
15+ }
16+ return ans ;
17+ }
18+ }
Original file line number Diff line number Diff line change 11# [ level 1] K번째수 - 42748
22
3- [ 문제 링크] ( https://school.programmers.co.kr/learn/courses/30/lessons/42748 )
3+ [ 문제 링크] ( https://school.programmers.co.kr/learn/courses/30/lessons/42748?language=java )
44
55### 성능 요약
66
7- 메모리: 10.3 MB, 시간: 0.01 ms
7+ 메모리: 75.9 MB, 시간: 1.94 ms
88
99### 구분
1010
1616
1717### 제출 일자
1818
19- 2024년 07월 08일 20:54:41
19+ 2026년 06월 27일 15:45:52
2020
2121### 문제 설명
2222
You can’t perform that action at this time.
0 commit comments