Pergunta de entrevista da empresa Riskified

Read code and explain its problems, how to improve it