목록sliding window (1)
취미가 좋다
239. Sliding Window Maximum
https://leetcode.com/problems/sliding-window-maximum/submissions/ Sliding Window Maximum - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Solution import heapq from collections import defaultdict class Solution: def maxSlidingWindow(self, nums, k): ans = [max(nums[:k])] pq = [] ou..
알고리즘 문제풀이/Leetcode
2021. 9. 28. 11:25