목록정렬 (2)
눈송이의 개발생활
문제 https://programmers.co.kr/learn/courses/30/lessons/42747 내 코드 def solution(citations): count = 0 citations.sort() for i in range(citations[-1] + 1): new_c = [j for j in range(len(citations)) if citations[j] >= i] if len(new_c) >= i: count = i else: break return count 다른 사람 풀이 def solution(citations): citations = sorted(citations) l = len(citations) for i in range(l): if citations[i] >= l-i: r..
문제 https://programmers.co.kr/learn/courses/30/lessons/42748 내 코드 def solution(array, commands): answer = [] for index in range(len(commands)): temp = [] i = commands[index][0] - 1 j = commands[index][1] k = commands[index][2] - 1 temp = array[i:j] temp.sort() answer.append(temp[k]) return answer 다른 사람 풀이 def solution(array, commands): answer = [] for command in commands: i,j,k = command answer.a..