Hard
Given an array nums and a window size k, the window slides from left to right one position at a time. Return an array of the maximum value in each window.
Input: nums = [1,3,-1,-3,5,3,6,7], k = 3 Output: [3,3,5,5,6,7]
Input: nums = [1], k = 1 Output: [1]