[프로그래머스] K번째수

Jin Lee·2022년 5월 8일
0

프로그래머스 Lv.1

목록 보기
21/32
post-thumbnail

문제 링크

https://programmers.co.kr/learn/courses/30/lessons/42748

문제 설명

단순 구현문제

def solution(array, commands):
    answer = []
    
    for command in commands:
        temp = array[command[0] - 1 : command[1]]
        temp.sort()
        answer.append(temp[command[2] - 1])
    
    return answer
profile
깃허브 : https://github.com/jinlee9270

0개의 댓글