Pergunta de entrevista da empresa Revolut

There was a dynamic programming question