Variable Size Sliding Window Algorithm Leetcode 7524317