sliding.py - class Solution(object def maxSlidingWindow(self nums k if not nums or k < 1 or k > len(nums return output = dq = for i num in

sliding.py - class Solution(object def...

This preview shows page 1 out of 1 page.

class Solution(object):def maxSlidingWindow(self, nums, k):if not nums or k < 1 or k > len(nums):return []output = []dq = []for i , num in enumerate(nums):if dq and dq[0]<i-k+1:
Background image

You've reached the end of your free preview.

Want to read the whole page?

  • Fall '19
  • Subroutine, class Solution

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture