Deutsche Bank Interview Question

how to improve the performance of rolling average?