Skip to content

Latest commit

 

History

History
6 lines (4 loc) · 359 Bytes

Patterns-for-coding-questions.md

File metadata and controls

6 lines (4 loc) · 359 Bytes

16 Patterns of interview algorithm questions

Sliding Window Pattern

In many problems dealing with an array (or a LinkedList), we are asked to find or calculate something among all the contiguous subarrays (or sublists) of a given size.

Sliding window come in aid. Brute-force will require complexity of O(n*K) while sliding window will cut it to O(N)