Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Week2_HW1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//220403
//프로그래머스 코딩테스트 연습 K번째수
//https://programmers.co.kr/learn/courses/30/lessons/42748

def solution(array, commands):
answer = []
for a in range(len(commands)):
i = commands[a][0]
j = commands[a][1]
k = commands[a][2]

new = array[i-1:j]
new.sort()
output = new[k-1]
answer.append(output)
new = []

return answer