Revolut interview question

the problem solving case presented above