Below is a high-yield, pattern-based set of sliding window problems. This covers all core variants:


1. Fixed-Size Window (Simplest Form)

Core Skill

Problems

Pattern

window_sum += nums[r]
if r >= k:
    window_sum -= nums[r-k]

Concepts


2. Variable Window (Expand + Shrink)