You are viewing a single comment's thread. Return to all comments →
By "sliding window" don't you mean a loop whithin a loop, so that it counts a surden amount ahead for each item in the lst.
By "sliding window", I mean one loop without nesting another loop within it. When you advance to the next item, you add one item and subtract another item.
Yo, thanks for that description. I hadn't thought of that. Made the solution so much cleaner.