Given an array nums and a window size k, return for each contiguous window of size k a pair [min, max] of its minimum and maximum, using two monotonic deques. The input is JSON {nums, k}.
Input: JSON {nums, k}.
Output: Array — a [min, max] pair for each window.
Input: {"nums":[1,3,-1,-3,5],"k":3}
Output: [[-1,3],[-3,3],[-3,5]]
Explanation: Min and max of each size-3 window.Input: {"nums":[4],"k":1}
Output: [[4,4]]
Explanation: One element.Input: {"nums":[2,1,5,3],"k":2}
Output: [[1,2],[1,5],[3,5]]
Explanation: Pairwise windows.1<=k<=n<=10^5