Domanda di colloquio di Quantlab

How did you approach solving the problem?