๋์ ์ฝ๋
def solution(array, commands):
arr = []
for i in range(len(commands)):
num = array[commands[i][0]-1:commands[i][1]]
num.sort(reverse=False)
ans = num[commands[i][2]-1]
arr.append(ans)
return arr
'Algorithm > Programmers' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Programmers] ํคํจ๋ ๋๋ฅด๊ธฐ (0) | 2022.05.19 |
---|---|
[Programmers] ์์ฅ (0) | 2022.05.18 |
[Programmers] ์คํจ์จ (0) | 2022.05.07 |
[Programmers] ๋ชจ์๊ณ ์ฌ (0) | 2022.05.05 |
[Programmers] JadenCase ๋ฌธ์์ด ๋ง๋ค๊ธฐ (0) | 2022.05.04 |