Sixt Interview Question

Sliding window maximum question with code