def solution(array, commands):
answer = []
for i in commands:
arr = array.copy()
arr = sorted(arr[i[0]-1:i[1]])
answer.append(arr[i[2]-1])
return answer
def solution(array, commands):
return list(map(lambda x:sorted(array[x[0]-1:x[1]])[x[2]-1], commands))
for command in commands:
i,j,k = command