ํ๋ก๊ทธ๋๋จธ์ค[Java] - K๋ฒ์งธ์(์ ๋ ฌ)
https://programmers.co.kr/learn/courses/30/lessons/42748 ์ฝ๋ฉํ
์คํธ ์ฐ์ต - K๋ฒ์งธ์ | ํ๋ก๊ทธ๋๋จธ์ค [1, 5, 2, 6, 3, 7, 4] [[2, 5, 3], [4, 4, 1], [1, 7, 3]] [5, 6, 3] programmers.co.kr ์ฝ๋ import java.util.*; class Solution { public int[] solution(int[] array, int[][] commands) { int[] answer = new int[commands.length]; for(int i=0; i commands[i][1] ~ commands[i][0]๊น์ง ์๋ฅธ ํ ์ ๋ ฌํ๋ฏ๋ก ๋ ๊ฐ ๋นผ๊ณ +1 int[] arr = new int[comman..
2020. 3. 4.