Categories
LeetCode

The Sliding Window Algorithm for string and array (Java codes and Leetcode problems as example)

The sliding window is a very common algorithm and is a handy algorithm.

What is the sliding window algorithm

We know what is a sliding window, just like the photo showing blow.