Hiver interview question

Sliding window and array duplication