Given an integer array nums and an integer k, there is a sliding window of size k which is moving from the very left of the array to the very right. Return the median array for each window in the original array.
- An array of integers
nums. - An integer
k.
Input: nums = [1, 3, -1, -3, 5, 3, 6, 7], k = 3
Output: [1.0, -1.0, -1.0, 3.0, 5.0, 6.0]