Amazon interview question

1. Sliding Window Sum