Domanda di colloquio di Tickertape

How would you solve this problem