Pergunta de entrevista da empresa Quantlab

How did you approach solving the problem?