Pregunta de entrevista de Wells Fargo

One recursion/dp based question and design valorant.