Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
WindowStart is not in the for statement, so it shouldn't iterate, so how it is m...

ornella

Mar 2, 2022

WindowStart is not in the for statement, so it shouldn't iterate, so how it is moving across the array?

0

0

Comments
Comments
Design Gurus
Design Gurus4 years ago

WindowStart is under 'for' loop. There is an extra 'if' condition because we don't need to slide the window until the window size hit 'k'.

On this page