Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Keep a frequency map of the elements in each window.
When the frequency of the element is 0, remove it from the map.
The answer to each window is the size of the map.