문제링크: K번째수
✍🏻 Information
| content | |
|---|---|
| 언어 | python |
| 난이도 | ⭐️ |
| 풀이시간 | 5분 |
| 제출횟수 | 1 |
| 인터넷검색유무 | yes |
🍒 My Code
def solution(array, commands):
answer = []
for i in commands:
tmparr = array[i[0]-1:i[1]]
tmparr.sort()
answer.append(tmparr[i[2]-1])
return answer
💡 What I learned
슬라이스(slice)