[프로그래머스] K번째수Lv.1
def solution(array, commands): answer = [] for arr in commands: temp_arr = array i, j, k = arr[0] - 1, arr[1], arr[2] - 1 temp_arr = sorted(temp_arr[i:j]) answer.append(temp_arr[k]) return answer