code: def max_sliding_window(nums, k):
      
      if not nums:
          return nums
      queue = collections.deque()
      res = []
      for num in nums:
          if len(queue) < k:
              queue.append(num)
          else:
              res.append(max(queue))
              queue.popleft()
              queue.append(num)
      res.append(max(queue))
      return res
docs: :type nums: List[int]
      :type k: int
      :rtype: List[int]