Need help in solving a question.

Hi, i was solving this question CodeChef: Practical coding for everyone but i can only think of recursive solution . Can anyone please tell me how to solve it using DP or any other approaches.

Thanks.

1 Like

You can look at this guy’s solution : http://www.codechef.com/viewsolution/6785795

1 Like