Miro Interview Question

I was asked to do basic sliding window algorithm task.