Amazon interview question

sliding window and sorting and algorithms