Question d’entretien chez IMC Trading

Basic Algo question. Maybe Medium difficulty on Hackerrank?