Question d’entretien chez Citi

Propose an efficient code that count moving average.