Synopsys Interview Question

A variant of the sliding window problem