Amazon Interview Question

sliding window and sorting and algorithms