Amazon interview question

Find average based on rolling window