Sliding Window Pattern Leetcode