Variable Size Sliding Window Leetcode Question Tree