Pergunta de entrevista da empresa Playtech

How to solve a specific recursive problem I.e. come up with an algorithm to solve it