Question d’entretien chez Tickertape

How would you solve this problem