Pregunta de entrevista de Revolut

the problem solving case presented above