An open API service indexing awesome lists of open source software.

https://github.com/felipeaz/sliding-window

Sliding Window is a pattern used to solve problems that requires operation in a specific window size
https://github.com/felipeaz/sliding-window

Last synced: 3 months ago
JSON representation

Sliding Window is a pattern used to solve problems that requires operation in a specific window size

Awesome Lists containing this project

README

        

# sliding-window
Sliding Window is a pattern used to solve problems that requires operation in a specific window size

To identify if a problem can be solved using this pattern, we can check if :
- The problem input is a linear data structure such as a linked list, array, or string
- You’re asked to find the longest/shortest substring, subarray, or a desired value

This pattern can solve the following common problems:
- Maximum sum subarray of size ‘K’
- Longest substring with ‘K’ distinct characters
- String anagrams