sliding window (1) 썸네일형 리스트형 [Python] 프로그래머스 - 징검다리 건너기 문제https://school.programmers.co.kr/learn/courses/30/lessons/64062 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr풀이풀이 1 (Sliding Window)def solution(stones, k): import heapq answer = 1e9 l = len(stones) # max heap heap = [] for i in range(k-1): heapq.heappush(heap, (-stones[i],i)) for i in range(k-1,l): heapq.heappush(heap, (.. 이전 1 다음