Pergunta de entrevista da empresa Klarna

How would you solve problem X given the code.