PRACTICE / UNDERSTAND / REPEAT
Data Structures & Algorithms practice question
Practice sliding windows with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
1 questionAnswers explainedFree · no login
Try this question
An array contains 5 elements. How many contiguous windows of length 3 does it have?
Answer & explanation
Answer: 3
A window of size k in an array of length L has L - k + 1 valid starting positions.