정렬만 라이브러리를 이용해서 구현 한다면 어려운 문제는 아니다. import java.util.*;class Solution { public int[] solution(int[] array, int[][] commands) { int[] answer = {}; int size = commands.length; answer=new int[size]; for(int i=0; i 2025 - 03 - 13 풀이import java.util.*;class Solution { public int[] solution(int[] array, int[][] commands) { Queue queue = new LinkedList(); ..