Skip to main content

Sliding Window

Efficiently process subarrays or substrings of a fixed or variable size.

15 problems 0 Easy 13 Medium 2 Hard

Problems (15)

Problem Link
Longest Substring Without Repeating Characters
Minimum Window Substring
Sliding Window Maximum
Longest Repeating Character Replacement
Permutation in String
Find All Anagrams in a String
Max Consecutive Ones III
Subarray Product Less Than K
Minimum Size Subarray Sum
Fruit Into Baskets
Minimum Operations to Reduce X to Zero
Longest Subarray of 1's After Deleting One Element
Count Number of Nice Subarrays
Frequency of the Most Frequent Element
Maximum Number of Vowels in a Substring of Given Length

Related Guide

How to Master the Sliding Window Pattern →

The sliding window technique turns O(n²) brute-force substring problems into clean O(n) solutions. H…

Enjoying this free content?

If this saved you time, buying me a coffee keeps new content coming.

Buy me a coffee
Buy me a coffee