Coding TestProgrammersLevel 1K번째수On this pageK번째수 Solution function solution(array, commands) { return commands.reduce( (acc, [start, end, target]) => [ ...acc, array.slice(start - 1, end).sort((a, b) => a - b)[target - 1], ], [] );} Review . References Programmers - K번째수