Question d’entretien chez J.P. Morgan

Hackerrank assessment, something about sliding window