1. leftMax – stores maximum values from the start of each block. 2. rightMax – stores maximum values from the end of each block.
Find the maximum value in each sliding window. Given an array of integers 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.