Pregunta de entrevista de Volant Trading

past project, algorithm question