Skip to content
RED SAG Skills
hardStudy question · answer published in Data Structures and Algorithms interview questions, so no pointsarrayssliding-window

The non-shrinking window trick

Some solutions for "longest valid window" use if instead of while when shrinking, so the window never gets smaller. Why does that still give the correct maximum length?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions